Ask Your Question

Mimikian's profile - activity

2020-10-13 01:36:10 -0600 received badge  Popular Question (source)
2015-06-25 03:17:10 -0600 received badge  Student (source)
2015-06-24 17:13:57 -0600 received badge  Editor (source)
2015-06-24 17:13:06 -0600 asked a question Shape module

I am trying to calculate distance between 2 images using shape context method (C++)

my code is:

cv::Ptr <cv::shapecontextdistanceextractor> mysc = cv::createShapeContextDistanceExtractor();
Mat query = imread("images/26.bmp", IMREAD_GRAYSCALE);
vector<point> contQuery = simpleContour(query);
Mat iiIm = imread("images/25.bmp", IMREAD_GRAYSCALE);
vector<point> contii = simpleContour(iiIm);
float distance = mysc->computeDistance(contQuery, contii); 
cout << distance << endl;

But when i add theses lines before the mentioned code:

Mat test = imread("images/8.bmp", IMREAD_GRAYSCALE); 
vector<point> testContour= simpleContour(test);

distance changes and gives new value, So why calling simpleContour() for another image can change the next values. implementation of simpleContour() exists in this file:
https://github.com/Itseez/opencv/blob...

2015-05-21 08:37:36 -0600 asked a question Image Normalization

Hi everoyne,

I have an image and i would like to have it normalized so that it has a prespecified mean and variance. Does OpenCV has a predefined function for this work ?

image description

where μd and σ2 are the desired values for mean and variance.

Thanks!