MatUtil.cpp
void matMaxima(const cv::Mat &mat, std::vector<Point> &locations, float rangeMin, float rangeMax) {
    assert(mat.isContinuous());
    assert(mat.channels()==1);
    assert(mat.rows > 0 && mat.cols > 1);
    assert(mat.type() == CV_8U || mat.type() == CV_32F);

    LOGTRACE3("matMaxima(%s,%f,%f)", matInfo(mat).c_str(), rangeMin, rangeMax);
    if (mat.type() == CV_8U) {
        _matMaxima<uchar>(mat, locations, (uchar)std::max(0.0f, rangeMin), (uchar)std::min(255.0f, rangeMax));
    } else if (mat.type() == CV_32F) {
        _matMaxima<float>(mat, locations, rangeMin, rangeMax);
    }
}
/**
 * Return vector of Points indicating the locations of local maxima.
 * Multi-point maxima with convex shapes are represented with an upper-right-most point.
 * Concave maxima sets don't fare as well and multiple points along the top of the point set will be reported.
 * For CV_32F matrices, this is infrequent, however, the situation may arise for CV_8U matrices and
 * the caller may need to process the returned locations further for centroids, etc.
 */
Return vector of Points indicating the locations of local maxima.
Multi-point maxima with convex shapes are represented with an upper-right-most point.
Concave maxima sets don't fare as well and multiple points along the top of the point set will be reported.
For CV_32F matrices, this is infrequent, however, the situation may arise for CV_8U matrices and
the caller may need to process the returned locations further for centroids, etc.
Return vector of Points indicating the locations of local maxima . Multi - point maxima with convex shapes are represented with an upper - right - most point . Concave maxima sets don ' t fare as well and multiple points along the top of the point set will be reported . For CV_32F matrices this is infrequent however the situation may arise for CV_8U matrices and the caller may need to process the returned locations further for centroids etc .
void matMaxima(const cv::Mat &mat, std::vector<Point> &locations, float rangeMin, float rangeMax) {
    assert(mat.isContinuous());
    assert(mat.channels()==1);
    assert(mat.rows > 0 && mat.cols > 1);
    assert(mat.type() == CV_8U || mat.type() == CV_32F);
    LOGTRACE3("matMaxima(%s,%f,%f)", matInfo(mat).c_str(), rangeMin, rangeMax);
    if (mat.type() == CV_8U) {
        _matMaxima<uchar>(mat, locations, (uchar)std::max(0.0f, rangeMin), (uchar)std::min(255.0f, rangeMax));
    } else if (mat.type() == CV_32F) {
        _matMaxima<float>(mat, locations, rangeMin, rangeMax);
    }
}
void matMaxima ( const cv :: Mat & mat , std :: vector < Point > & locations , float rangeMin , float rangeMax ) { assert ( mat . isContinuous ( ) ) ; assert ( mat . channels ( ) == 1 ) ; assert ( mat . rows > 0 && mat . cols > 1 ) ; assert ( mat . type ( ) == CV_8U || mat . type ( ) == CV_32F ) ; LOGTRACE3 ( " " , matInfo ( mat ) . c_str ( ) , rangeMin , rangeMax ) ; if ( mat . type ( ) == CV_8U ) { _matMaxima < uchar > ( mat , locations , ( uchar ) std :: max ( 0.0f , rangeMin ) , ( uchar ) std :: min ( 255.0f , rangeMax ) ) ; } else if ( mat . type ( ) == CV_32F ) { _matMaxima < float > ( mat , locations , rangeMin , rangeMax ) ; } }
Return vector of Points indicating the locations of local maxima.
Return vector of Points indicating the locations of local maxima .