|
Display Line Anonymous |
11 year
|
Hello!
Which are the coordinates that I set to draw the two lines (green and purple) I've drawn in the image?
The starting point must be COG_Y and COG_X, and the end point to the picture that interests me.
These two have to go away changing when the object moves, about the center of gravity (compare right with left image).
|
|
|
Carl from Your Country [1447 posts] |
11 year
|
The first task would be to detect the rectangular object otherwise you don't know the bounds of the line (i.e. where it stops and starts) Knowing the COG just tells you where the color should change but not where the line extents are.
Is that a realistic image? It seems to have been already processed since most real images do not appear so black and white. Perhaps if you could include the original raw images that you are using and your current robofile we can help you to detect and then draw the line accordingly.
I assume that the COG is detecting the same object so you probably just need a Blob Replace to a rectangle which will then save the bounds of that rectangle as variables which can then be used in the draw lines modules.
STeven.
|
|
|
Anonymous |
11 year
|
Hi Steven.
I hang up the program and the video so I can put either your variables in the two lines (display_lines).
Thanks. video.zip program.robo
|
|
|
Carl from Your Country [1447 posts] |
11 year
|
|
|
Anonymous |
11 year
|
Hi Steven.
It's more or less what I need, but not exactly. I send another program where you can see the fault. I need the yellow dot is solid all the time on the purple line, and when the image is to the left, the distance lower value.
I send you another picture so you can see what I need and then being able to represent the video in RoboRealm.
Sorry for my English.
Thank you.
video.zip program.robo
|
|
|
Carl from Your Country [1447 posts] |
11 year
|
Try the attached.
Note, you'll need to download the latest version for the video to play.
STeven. program.robo
|
|