Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File: icorner.m - Issue on the implementation of 'suppress' option #22

Open
GoogleCodeExporter opened this issue Jul 31, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. b1 = iread('building2-1.png','grey','double');
2. C1 = icorner(b1, 'nfeat', 200);
3. C2 = icorner(b1, 'nfeat', 200, 'suppress', 20);

What is the expected output? What do you see instead?
For the first call of "icorner" it should return the first 200 strongest 
corners.
For the second call it should return the first 200 strongest corners that do 
not overlap regarding a circle with the radius of 20 pixels. (the corner should 
be more dispersed in the output image).
But, both calls return exactly the same first 200 strongest corners.   

What version of the product are you using? On what operating system?
Vision-3.3, Windows 8.1 x64, and Matlab R2012a

Please provide any additional information below.
Reviewing the "icorner" source code I found the problem:
line 280: d = sqrt( sum((features.v'-y).^2 + (features.u'-x).^2) );
This line compute the sum of the distances between current corner and the 
corners already saved on the solution. In this case "d" is a scalar. 
But, we need to compute the individual distances between the current corner and 
each corner part of the solution. In this case "d" it will be an array. 
Regarding to the minimum value from "d", we can take a decision if we keep the 
corner or not.
Fix: d = sqrt((features.v'-y).^2 + (features.u'-x).^2); 
Because of this modification, we need to do one more thing: add a new index to 
the loop. We already have one for parsing the list of corners (which in the 
current implementation is "i"), and we need one more for the output array.
We need to keep increasing "i" on each iteration, but "j" (the second index) 
only if we keep the current corner.(is part of the solution)
Attached to this report, is also the icorner.m modified file.

Best Regards,
Andrei

Original issue reported on code.google.com by cos...@live.com on 2 Feb 2014 at 9:47

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant