|
Nearest blob Dawson from Malaysia [173 posts] |
11 year
|
Is it possible to find the nearest blob based on blob perimeter instead of blob COG?
|
|
|
Dawson from Malaysia [173 posts] |
11 year
|
What i would like to do is to set a point and find the blob closest to that point based on that blobs closest perimeter point.
|
|
|
Steven Gentner from United States [1446 posts] |
11 year
|
Dawson,
Can you provide some context? For example, you have obviously tried something that was using the COG as that comparison. What module were you using to do this? The blob filter? or custom code?
This is quite easy to do but we're not sure how to add it such that its useful to you.
STeven.
|
|
|
Dawson from Malaysia [173 posts] |
11 year
|
STeven,
As you can see the closest blob is the one above the one that was isolated in terms of perimeter distance.
program.robo
|
|
|
Dawson from Malaysia [173 posts] |
11 year
|
Steven,
Maybe a new checkbox can be added in the blob filter module. The "Nearest" feature could have this checkbox "based on perimeter".
|
|
|
Steven Gentner from United States [1446 posts] |
11 year
|
Ok, give the latest version a try. It has that checkbox to switch from COG to a perimeter distance from an X,Y point. Hope this helps.
STeven.
|
|
|
Dawson from Malaysia [173 posts] |
11 year
|
Hi STeven,
I just tested it. It does not seem to work. Nothing is displayed after the blob filter with and without the new check box ticked.
|
|
|
Steven Gentner from United States [1446 posts] |
11 year
|
Can you post the I.gif image too so that we can actually test what you are trying to do?
I'm not sure what you were asking for was actually what you needed.
STeven.
|
|
|
Dawson from Malaysia [173 posts] |
11 year
|
Hi Steven,
Ok for example I want to find the blob closest to point x=139 and y=23
The answer I want is = Green blob (blob(4))
The answer I was getting in version 2.56.25 = Blue blob (blob(3))
In version 2.56.26 it is totally blank.
|
|
|
Steven Gentner from United States [1446 posts] |
11 year
|
I get the green blob as the nearest to that point in 2.56.26 using the attached robofile. Perhaps the version wasn't quite up when you downloaded it. Can you redownload RR and give the attached a try?
STeven.
program.robo
|
|
|
Dawson from Malaysia [173 posts] |
11 year
|
Hi STeven,
Yes I downloaded it again and restart my PC. It is working perfectly now. Excellent. Thanks.
|
|