OpenCV453
公開メンバ関数 | 静的公開メンバ関数 | 全メンバ一覧

cv::Algorithmを継承しています。

公開メンバ関数

virtual CV_WRAP void setSegEgbThresholdI (float c)=0
 : set and get the parameter segEgbThresholdI. This parameter is used in the second stage mentioned above. It is a constant used to threshold weights of the edge when merging adjacent nodes when applying EGB algorithm. The segmentation result tends to have more regions remained if this value is large and vice versa.
 
virtual CV_WRAP float getSegEgbThresholdI ()=0
 
virtual CV_WRAP void setMinRegionSizeI (int n)=0
 : set and get the parameter minRegionSizeI. This parameter is used in the second stage mentioned above. After the EGB segmentation, regions that have fewer pixels then this parameter will be merged into it's adjacent region.
 
virtual CV_WRAP int getMinRegionSizeI ()=0
 
virtual CV_WRAP void setSegEgbThresholdII (float c)=0
 : set and get the parameter segEgbThresholdII. This parameter is used in the third stage mentioned above. It serves the same purpose as segEgbThresholdI. The segmentation result tends to have more regions remained if this value is large and vice versa.
 
virtual CV_WRAP float getSegEgbThresholdII ()=0
 
virtual CV_WRAP void setMinRegionSizeII (int n)=0
 : set and get the parameter minRegionSizeII. This parameter is used in the third stage mentioned above. It serves the same purpose as minRegionSizeI
 
virtual CV_WRAP int getMinRegionSizeII ()=0
 
virtual CV_WRAP void setSpatialWeight (float w)=0
 : set and get the parameter spatialWeight. This parameter is used in the first stage mentioned above(the SLIC stage). It describes how important is the role of position when calculating the distance between each pixel and it's center. The exact formula to calculate the distance is $colorDistance + spatialWeight \times spatialDistance$. The segmentation result tends to have more local consistency if this value is larger.
 
virtual CV_WRAP float getSpatialWeight ()=0
 
virtual CV_WRAP void setSlicSpixelSize (int n)=0
 : set and get the parameter slicSpixelSize. This parameter is used in the first stage mentioned above(the SLIC stage). It describes the size of each superpixel when initializing SLIC. Every superpixel approximately has $slicSpixelSize \times slicSpixelSize$ pixels in the beginning.
 
virtual CV_WRAP int getSlicSpixelSize ()=0
 
virtual CV_WRAP void setNumSlicIter (int n)=0
 : set and get the parameter numSlicIter. This parameter is used in the first stage. It describes how many iteration to perform when executing SLIC.
 
virtual CV_WRAP int getNumSlicIter ()=0
 
virtual CV_WRAP Mat performSegmentGpu (InputArray src, bool ifDraw=true)=0
 do segmentation gpu [詳解]
 
virtual CV_WRAP Mat performSegmentCpu (InputArray src, bool ifDraw=true)=0
 do segmentation with cpu This method is only implemented for reference. It is highly NOT recommanded to use it.
 
- 基底クラス cv::Algorithm に属する継承公開メンバ関数
virtual CV_WRAP void clear ()
 Clears the algorithm state [詳解]
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage [詳解]
 
CV_WRAP void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindings これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。
 
virtual CV_WRAP void read (const FileNode &fn)
 Reads algorithm parameters from a file storage [詳解]
 
virtual CV_WRAP bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read [詳解]
 
virtual CV_WRAP void save (const String &filename) const
 
virtual CV_WRAP String getDefaultName () const
 

静的公開メンバ関数

static CV_WRAP Ptr< HfsSegmentcreate (int height, int width, float segEgbThresholdI=0.08f, int minRegionSizeI=100, float segEgbThresholdII=0.28f, int minRegionSizeII=200, float spatialWeight=0.6f, int slicSpixelSize=8, int numSlicIter=5)
 : create a hfs object [詳解]
 
- 基底クラス cv::Algorithm に属する継承静的公開メンバ関数
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node [詳解]
 
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file [詳解]
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String [詳解]
 

その他の継承メンバ

- 基底クラス cv::Algorithm に属する継承限定公開メンバ関数
void writeFormat (FileStorage &fs) const
 

関数詳解

◆ create()

static CV_WRAP Ptr< HfsSegment > cv::hfs::HfsSegment::create ( int  height,
int  width,
float  segEgbThresholdI = 0.08f,
int  minRegionSizeI = 100,
float  segEgbThresholdII = 0.28f,
int  minRegionSizeII = 200,
float  spatialWeight = 0.6f,
int  slicSpixelSize = 8,
int  numSlicIter = 5 
)
static

: create a hfs object

引数
heightthe height of the input image
widththe width of the input image
segEgbThresholdIparameter segEgbThresholdI
minRegionSizeIparameter minRegionSizeI
segEgbThresholdIIparameter segEgbThresholdII
minRegionSizeIIparameter minRegionSizeII
spatialWeightparameter spatialWeight
slicSpixelSizeparameter slicSpixelSize
numSlicIterparameter numSlicIter

◆ performSegmentGpu()

virtual CV_WRAP Mat cv::hfs::HfsSegment::performSegmentGpu ( InputArray  src,
bool  ifDraw = true 
)
pure virtual

do segmentation gpu

引数
srcthe input image
ifDrawif draw the image in the returned Mat. if this parameter is false, then the content of the returned Mat is a matrix of index, describing the region each pixel belongs to. And it's data type is CV_16U. If this parameter is true, then the returned Mat is a segmented picture, and color of each region is the average color of all pixels in that region. And it's data type is the same as the input image

このクラス詳解は次のファイルから抽出されました: