Ask Your Question

Revision history [back]

Why do the values returned from Brisk's smoothedIntensity it are very large, much larger than intensity values?

Hi,

I have a question regarding Brisk's function "smoothedIntensity".

Why do the values returned from it are very large, much larger than intensity values?

Should they be the size of intensity values (since they are smoothed intensities)? And why does Brisks uses an integral image?

I replaced the implementation with the following simple implementation that gives the sum of the 3x3 box around the pixel, could you please tell me if it's correct?

inline int
        BRISK4::smoothedIntensity(const cv::Mat& image, const cv::Mat& integral, const float key_x,
        const float key_y, const unsigned int scale, const unsigned int rot,
        const unsigned int point) const
    {

        // get the float position
        const BriskPatternPoint& briskPoint = patternPoints_[scale * n_rot_ * points_ + rot * points_ + point];
        const float xf = briskPoint.x + key_x;
        const float yf = briskPoint.y + key_y;
        const int x = int(xf);
        const int y = int(yf);
        const int& imagecols = image.cols;

        // get the sigma:
        const float sigma_half = briskPoint.sigma;
        const float area = 4.0f * sigma_half * sigma_half;

        // calculate output:
        //Gil changes here the returned val will be the sum of patch of 3X3
        int ret_val = image.at<uchar>(y-1,x-1) + image.at<uchar>(y-1,x) + image.at<uchar>(y-1,x +1) + 
                      image.at<uchar>(y,x-1) + image.at<uchar>(y,x) + image.at<uchar>(y,x +1) + 
                      image.at<uchar>(y+1,x-1) + image.at<uchar>(y+1,x) + image.at<uchar>(y+1,x +1); 

        return ret_val;
    }

The current smoothedIntensity implementation confused me, so I'm really not sure anymore.

Thanks,

Gil.