Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Negative values for the feature coordinates obtained using goodFeaturesToTrack() in opencv

I am finding the feature points using goodFeatureToTrack() in opencv. But when i checked the coordinates(x,y) of the obtained features, i found that some of them are negative.

How is it possible that feature coordinates are negative. My partial code is below;

goodFeaturesToTrack( frame1, cornersFrame1, maxCorners, qualityLevel, minDistance, Mat(), blockSize, useHarrisDetector, k ); 

for(int i=0; i<cornersFrame1.size(); i++)
{
    int row = (int)cornersFrame1[i].y;
    int col = (int)cornersFrame1[i].x;  
    cout<<"\n cooridnates:  ("<<row<<" , "<<col<<"  )";
}