Finding Coordinates on Feature of Blob
Alexander from Australia  [6 posts]
7 year

I have recently started using your software and would like to find the exact point that the two points of a corn kernel intersect. I have attached all of my code and files to this email. At this point I have successfully converted the corn into a singular blob and I am hoping to use the Harris Corners module to find where the points occur. I don't know how to select two points that are roughly 60 degrees a part.

Before I go into any more detail here is my objective.
"Find the coordinates of where the corn kernels meet such that two are selected that are 60 degrees a part"
Please refer to the Finalized Image for what I would like to achieve.

The corn will be orientated the same way through out each photo. Only the bottom portion would be used.

Here are a number of questions I have.
1) How would you go about finding the coordinates of these locations?
2) Is Harris Corners the bet method to find the corners?
3) Could I use the object recognition module to find the correct Harris corners?
4) How would I find the coordinates of the Harris Corner points?
5) Is there anything else you would need to know in order to provide me with the best advice?

I would like to thank you for providing such a powerful and user friendly software. I can say that it has been extremely easy to understand and the tutorials were vital in learning how to somewhat use your software package. So thank you!


Harris Corner.robo
Kernal on Black Code Newer.robo
Kernal on Black Code.robo
Steven Gentner from United States  [273 posts] 7 year

You need an extra point, perhaps the center, that provides an intersection point. I've included your sample (cleaned up a bit) that shows how these lines can be calculated. Now all you need to do is see which two sets of lines are 60 degrees apart (see atan2 function for that) to produce the result.

This seems like a school project as its a bit obscure why you would care about just two kernels 60 deg apart. I would expect for this project one really wants to know how deep the kernels are in order to remove from them the stalk ... so I suspect this is a specific image analysis project?

To answer your questions:

1. See attached.
2. Harris seems to work ... the "best" method is subjective and really depends on more aspects of the project that included here.
3. Don't even try the Object Recognition module ... that does not apply here.
4. Harris module produces HARRIS_CORNERS array ... see docs or attached robofile for that.
5. What's the main point of this project? The results you are asking for don't seem like they would be very useful in any application we can think of. Best to propose the overall scope of the project that a specific portion that you think might be useful. There are often shortcuts to get to the final goal without needing to determine all specifics of the image. Keep it simple!


Alexander from Australia  [6 posts] 7 year
Hello Steven,

Thank you once again for your incredibly quick response time. What you have said so far has made a great difference to my understanding of RoboRealm.

The aim is to locate the exact point between the two corn kernels that are 60 degrees a part in order to position a knife. The husk will still be on the corn. It was my first time using RoboRealm so I started off with an easier problem.

Would you have any other recommendations in how to identify the corn kernel intesection at 60 degrees a part?

Thanks once again,


Steven Gentner from United States  [1446 posts] 7 year

Its easier if you label (i.e. draw) ontop of the images you posted so that we can better understand what points or perhaps circle you wish to identify.

Would just knowing the radius of the entire corn husk provide a way to just reduce it by a percentage which would be the outline of the inner kernel?

Alexander from Australia  [6 posts] 7 year
Hi Steven,

The aim has been to try and find where I can insert a small knife to cut the husk away. You can see in the image below that the best places would be where there is a gap between the husk and the kernel itself. Most of the time this yields a black triangle and this would be the perfect place to make an incision. I would like to make two cuts at 60 degrees to each other leaving the majority of the husk on the corn.

The problem at the moment is that the corn husk and kernel are very similar in colour and it has been difficult to distinguish between the two colours using RGB filters or any other method.

Again, thank you so much for your help! Your advice has been invaluable.


Steven Gentner from United States  [1446 posts] 7 year

This is certainly a difficult problem due to the lack of contrast between the parts of the corn.

My next attempt would be to see how well one could fit an ideal model of where the cuts should be to where they are. This gets very complicated but the idea can be seen in the attached robofile/image. The idea is to unwrap the corn from the middle to create a more horizontal image with vertical lines to work with. Finding the edges and consolidating those edges vertically will help to indicate where a potential division is. If you look at the attached image you will notice small peaks where the division between the corn kernels are. One could then process the resulting array for peaks that best fit a specified spacing (i.e every 60 deg) or 16.67% of the image width. (Or every 120 pixels in the example case since we scaled it to 720 or 360*2 pixels to make things easier).

This isn't going to be easy since the division is very subtle and thus the peaks are very low and not very pronounced ... but maybe this gives you some more ideas.




This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index