How to detect larger corners in an image?

Hi,
I am having trouble understanding how to use "corner". An image of my problem can be found here:
Basically, I'm picking up lots of speckles in my photo, but not a lot of what I'd consider to be corners. Based on my understanding of how corner detection algorithms work, I think I'd like the area used to compare the pixel to it's neighbors to be larger (but I could be wrong). How is this accomplished? Thanks in advance!
-Jen

 Respuesta aceptada

Anand
Anand el 20 de Jun. de 2013

0 votos

I'd suggest trying to play around with the 'FilterCoefficients' and 'QualityLevel' parameters.
Increasing the kernel width and smoothing on the kernel has the effect of blurring out corners at smaller scales.
Increasing 'QualityLevel' would mean the minimum corner strength increases.
Post the actual image if that doesn't work.

5 comentarios

John
John el 20 de Jun. de 2013
Editada: John el 20 de Jun. de 2013
See, I think the filter coefficients etc. will help smooth out the corners I don't want, but it doesn't help find the corners I do want (see the two images in the original question).
So, as I understand it, you're trying to detect a corner at a much larger scale than the corners that are being detected. I have two suggestions:
1. Reduce the size of the image by a power of two. When you do that, a lot of the corners at smaller scales disappear and you're desired corner has a better chance of showing up. You can then calculate the position of that corner in the original image coordinates. Note that you will lose some localization in the process.
2. Another approach is to increase the standard deviation of the filter coefficients parameter. So, use something like
filt_coef = fspecial('gaussian',[5 1],3);
John
John el 20 de Jun. de 2013
Yea, after messing around, I think rescaling the photo is my best bet. Thanks!
John
John el 20 de Jun. de 2013
Actually, after scaling down, finding corners, and scaling back up, I can then zoom in around that point to do a more refined search for the corner (ie using hough at that point, since the lines are nearly linear when zoomed in)
Anand
Anand el 21 de Jun. de 2013
Great. That's sounds like a neat approach.

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 20 de Jun. de 2013

0 votos

Try adjusting some of the optional input parameters of corner(). If that doesn't work, filter out the bad ones with bwarea(), or prefilter the image by thresholding it.
Second option is to use hough() or houghlines() and look for where lines intersect.
Third option is to use bwboundaries() and find the kinks in the boundary using the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_find_.22kinks.22_in_a_curve.3F

3 comentarios

John
John el 20 de Jun. de 2013
hough lines doesn't work, because my corners are intersections of curves.
I like the kinks approach; any ideas on how to do that best with grayscale images? I can use edge, but that doesn't link pixels in a row like boundaries would.
Image Analyst
Image Analyst el 20 de Jun. de 2013
Your first statement is not true. You get the lines then you have to figure out where lines that are perpendicular to each other intersect. The hough is just the first step and the intersection-finding is the second step.
I'm not sure why you want to use grayscale images and edge() (which I did not recommend), rather than binary images, bwboundaries(), and the FAQ code for finding kinks like I recommended.
John
John el 20 de Jun. de 2013
No, hough doesn't work because it's not an intersection of lines, but an intersection of arcs and splines.
As for greyscale, the problem is that I'm trying to auto process a number of photos in variable light conditions. It's not been easy so far to find the right threshold to go to a BW image; if it could work off a greyscale then it would be looking for relative changes, which would be easier. It sounds like my original question might be answered, though, in that you can't increase the size of the "window" used for comparisons in corner()

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 20 de Jun. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by