loading
 
Load image problem
Dima from Ukraine  [3 posts]
11 year
Hi!
I have many images, in which i need define an angle between two points (blobs)
images and .robo file (2 MB): http://www10.zippyshare.com/v/97083155/file.html

If I open an image manually, my algorithm define an angle perfectly.
But i have hundreds of images, so i want load an image automatically. I put on the first place "Load image" module (it disabled in .robo), choose "Read images in folder" and run RoboRealm. Now it dont define angle correctly besause "Center of the gravity" don`t open new image.
Please help to solve this problem.

P.S. Sorry for my bad Ukranian English :)
Anonymous 11 year
Dima,

You need to specify a marker module just after the load image module to set that to the Source image. The Load Module does not make the current image the source image. Once that is done it seems to work well.

I've made the update to test.robo included here.

Based on what you are trying to do there is a quicker way. I've included a second test_2.robo that uses the BLOB array that the Blob Filter module creates as a way to get angle and display information. That seems to track the dots better.

Are you creating the green dots yourself? It seems that the middle point vibrates more than the rest of the image ... you can just use the length of the bar to directly calculate the angle if you want which would save the trouble of annotating the images.

We can send you back something to that effect if you are interested.

STeven.
Anonymous 11 year
Here are the robo files.
program.robo
Anonymous 11 year
And the new one using the Blob Filter Array.
program.robo
Dima from Ukraine  [3 posts] 11 year
Big thanks! It work.
I put green points on picture by myself in "Paint", to practice in recognition.

Can you tell some details about "you can just use the length of the bar"?
Dima from Ukraine  [3 posts] 11 year
And one more question:
I save the angle, i obtain in Excel.
But angle is not correct (see picture). I don`t understand, how i must correct this angle.


 
Anonymous 11 year
Dima,

The issue is one of mirroring. The angle will switch direction depending on which spot is used in the angle equation. For example, starting on the outer spot towards the inner the angle can be 45deg. But on the same image if you start with the inner spot and move outer then the angle is 225. So when you perform the calculation you need to verify that the first spot used is always the center spot. This can be done in code to see which spot is closer to the center of the screen (i.e. sort the two locations based on distance to center of screen) so that the order is always inner and then outer.

STeven.

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