Ask Your Question
0

Wrong Position From cvGoodFeaturesToTrack()!

asked 2012-08-07 20:00:53 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Hi, All

We are trying to locate corners with cvGoodFeaturesToTrack. The version is opencv 2.3.1. The test picture is a 24-bit bmp file, which is manually made with Windows Pen. So you know, it is a "perfect" picture. It has no noise.

There is only one inner corner in the picture. It looks like BMW logo.

And this is the code:

cvGoodFeaturesToTrack(pGrayImg,
  OUT pEigImg, 
  OUT pTempImg, 
  OUT sCorners, 
  IN &iAmtCorners, //corner_count
  0.0510, //quality_level
  5.0, //min_distance
  0, //mask
  15, //block_size
  0, //use_harris
  0.04); //k CV_DEFAULT(0.04)

The code told me that the corner lies in (101, 60). However, it should be (94, 67). We drew a circle at (101, 60) and we found it doesn't overlap the corner! Why the function returns a wrong position?

Thanks!

edit retag flag offensive close merge delete

Comments

You should attach your input image.

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-08-09 02:07:36 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-08-07 23:06:52 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

The reason is block_size! It must be 3! Maybe it is a bug of OpenCV.

edit flag offensive delete link more

Comments

I think you are right, large block sizes can result in corners that are slightly dislocated with respect to true ones, but I don't see this as a bug (its a feature for me).

Indeed, I took a brief look in the paper [Shi94] and the authors don't mention the size of the window used to compute the derivatives.

gfuhr gravatar imagegfuhr ( 2012-08-08 08:01:35 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-08-07 20:00:53 -0500

Seen: 372 times

Last updated: Aug 09 '12