24,860
社区成员




cv::MSER(2, 10, 5000, 0.5, 0.3)(gray, regContours);
class CV_EXPORTS_W MSER : public FeatureDetector
{
public:
//! the full constructor
CV_WRAP explicit MSER( int _delta=5, int _min_area=60, int _max_area=14400,
double _max_variation=0.25, double _min_diversity=.2,
int _max_evolution=200, double _area_threshold=1.01,
double _min_margin=0.003, int _edge_blur_size=5 );
//! the operator that extracts the MSERs from the image or the specific part of it
CV_WRAP_AS(detect) void operator()( const Mat& image, CV_OUT vector<vector<Point> >& msers,
const Mat& mask=Mat() ) const;
AlgorithmInfo* info() const;
protected:
void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
int delta;
int minArea;
int maxArea;
double maxVariation;
double minDiversity;
int maxEvolution;
double areaThreshold;
double minMargin;
int edgeBlurSize;
};
MSER A(2, 10, 5000, 0.5, 0.3);
A(gray, regContours);
cv::MSER(2, 10, 5000, 0.5, 0.3)(gray, regContours);
其前段cv::MSER(2, 10, 5000, 0.5, 0.3)已经实例化对象了啊。
编译器已经知道此处有个实例对象,当然可以直接调用成员函数了。
只不过这个实力对象没有载体,只能这里调用一次。
之后就丢失了可寻的载体,你就没法用了而已。