loading
 
Multiple object tracking
Twocups from United Kingdom  [3 posts]
17 year
Is it possibile to use RoboRealm to track two objects (blobs) simultaneously? I see that you can label a blob but cant quite work out how you could have two blob filters and then track the COG of each.

To put this in context, i'd like to measure the distance between two laser points in order to determine (roughly) distance.

Thanks for your help - a pointer in the roight direction is all I need.. i think!

marker?
voodoo from Germany  [4 posts]
17 year
hi,

perhaps using a marker could help you out?

could looks like this:

-set a marker
-do blobfiltering for object1
-do cog
-write the cog-variables of interes to private variable(s) a1,b1,... (could be done by a small vbscript)
-revert to marker
-do blobfiltering for object2
-do cog
-write the cog-variables of interes to private variable(s) a2,b2,... (could be done by a small vbscript)

now you the cog variables for both objects.

hope this helps.

greetz

voodoo
Marker
Twocups from United Kingdom  [3 posts]
17 year
Marker was just the thing I was looking for. Thanks!

BLOBS Array
Anonymous
17 year
Marker,

As an alternative, you could also try using the blob array created from the Blob Filter. This is a new feature so you will need to download RoboRealm again. The blob array contains the COG coordinates of all blobs detected in the Blob Filter. If you can use the blob filter to reduce the blobs down to the two that you want to check the distance between you can then use a small VBScript program to perform this calculation. Have a look at the bottom of http://www.roborealm.com/help/Blob_Filter.php for an example of how to use this array. Note that there is a checkbox on the blob filter interface that needs to be selected before this array will be created.

STeven.
Blobs Array
Twocups from United Kingdom  [3 posts]
17 year
That seems like an even better solution, now I dont have to distinguish between the two blobs.

Cheers

Multipoint tracking
Anonymous
17 year
Using FIR (Frustrated Internal Reflection) many people have made multi point touchscreens. Using an IR webcam, touching a perspex panel (correctly) lit with IR leds creates IR blobs visible from the back of the panel by the IR camera (Output image is rear projected with normal visible light by any projector onto the rear same panel). If this software could locate each blob and give X/Y for as many as appear, you have a multipoint touchscreen interface for windows!
Just thought id bring that up as a great use for this program.
FIR
Anonymous
17 year
Yes, that should totally be possible. You would probably use a couple filters to clean up the blobs and then use the blob_filter module which produces a blob_array VBScript array that contains all the X/Y coordinates of the blobs. You could then process this array for further actions.

Nice idea!

STeven.
Scott from United States  [7 posts] 16 year
"You could then process this array for further actions."

How would you do just that? Do you have some sample script? I have up to 9 blobs I'm trying to track. I'd like to have there x and y coordinates displayed on the screen directly over the blob. Thanks.
Anonymous 16 year
You would use the VBScript module and do something like:

list = GetArrayVariable("BLOBS")

if isArray(list) then
  ' we have an array - write out the size
  write "The size is " & ubound(list) & vbCRLF

  ' now write out all the elements
  for i = 0 to ubound(list) step 2
    write "X: " & list(i) & " Y:" & list(i+1) & vbCRLF
  next

end if

which in this example just prints out the X,Y coordinates in the VBScript output. If you want to save these values to disk have a look at the Write_Variables module. If you want to transmit them to other applications have a look at the API, Extensions, Web Server, Execute Command, etc. references in the bottom of the Getting Started page at

http://www.roborealm.com/help/Getting%20Started.php

STeven.
Scott from United States  [7 posts] 16 year
Thank you for all your help. That script worked great and in the "messages:" box (of the VBscript module) shows me everything I need. However, when I tried the "write_variables" module, I can't seem to find the correct variable in the list on the left that will save out the X and Y coordinates. I've tried adding "Blobs" and "Bigger than," but no luck getting the saved coordinates. Am I missing a step?

Scott
Anonymous 16 year
Scott,

Seems to be ok after some quick testing. Can you include your robofile that you are using?

Note that if the data does not change (i.e. you are using a static image for testing) it will not write everytime to the text file. By editing the module and pressing OK will force it to write at least once to the file ... be sure to specify the right filename!

STeven.
Scott from United States  [7 posts] 16 year
Sure here is one of the files I've been working with. However I am not using a capturing device. I am using an avi file that I have processed through a different application (Binary Images,) so the BG subtraction has already been performed.
program.robo
Anonymous 16 year
It appears ok, but the Write_Variables did not have the BLOBS array selected. Do you see the variable BLOBS as the first entry in the Available variables? This needs to be selected and moved to the Save variables list. This it should look something like



and the text file should seem something like

BLOBS
202,352,989,806

(in our case we only had four detected blobs).

STeven.
Scott from United States  [7 posts] 16 year
O.K. yes, I did add the "BLOBS" array once before and got the same sort of numbers as you. I'm trying to get the X and Y coordinates of each blob through out the video sequence. Are those numbers the X and Y coordinates? How do I distinguish which number(s) belongs to which blob? Thanks
Scott from United States  [7 posts] 16 year
Just wanted to add that the VBscript module DOES give me the X and Y's that I need as seen the in the "Messages:" box. I just need to save them.
Scott from United States  [7 posts] 16 year
O.K. I actually did it using the COG module and setting markers. I used the original image and RGB filtered it (which narrowed my 10 blobs down to the two objects of that color, and where I was getting stuck before with the COG module.) Do to natural variations in lighting and preprocessing/threshholding, the blobs were not exactly the same size after I RGB filtered them. So what I did was use the RGB filter, then the Blob filter/size filter - largest, smallest, bigger than, smaller than, or what ever combination I needed to isolate the blob I was looking to get the COG on. Then I set a marker, went back to the blob filter to isolate the other blob of that color to get the COG on that blob. Set a marker, filtered the next color, size and so on. I now have X and Y COG's on all the blobs I'm tracking.

I don't know if this way was more difficult or not, but it seems to work out quite well. Just a little slow to process all those markers.

Thanks for all your help STeven. I may need to contact you with more information on the "extensions" and "controls" modules of this software, but for now it's great for what I'm trying to do.
Anonymous 16 year
Sounds good Scott!. One thing you'll notice is that there are many ways to achieve the desired effect. The trick is to pick one that suits your needs!

STeven.
Anonymous 16 year
Steven,

Is there a way to get the size of the blobs into the array provided by the Blob Filter module?
Anonymous 16 year
Jon,

Sort of. If you check the "create array variable" in the individual filter dialogs the values generated by each blob will be added into an array. This unfortunately will not report the actual size but the relative size if you happen to insert the smallest or largest filter criteria in the list.

Alternatively and more simply, just insert the Geometric_Statistics module after the blob filter and it will generate that array for you. (Be sure to select individual blobs radio button in that dialog.)

STeven.
Andrew  [8 posts] 15 year
Well I need to do something similar - track multiple blobs.
I like the red blob tracker demo, in particular the way the COG routine tracks red objects, but I can't seem to get COG to track 2 red objects and display on screen. Is there any way to do this?
Anonymous 15 year
Andrew,

Are the objects you want to track in complete blobs? Ie. the COG tracker will track anything on the image regardless if it is all one blob or not. For multiple objects you can use the Blob_Filter module to filter out unwanted blobs and then select the "Create BLOBS array variable" checkbox on that GUI which will create a variable that contains all the COG's of all resulting blobs. This variable can then be used in other modules or exported as needed.

Perhaps you can also include an example image if you still have any problems in tracking the desired objects. Its much easier to recommend a technique if we have an image to see.

Thanks for the donation!

STeven.
mehdi from Iran  [32 posts] 15 year
hi!
if i have 5 similar blobs and i want to track them. i can extract all blobs in picture,but they have not seprate parameters!
consider i have 5 circles in my video and they move independently and randomly.
how can i simultaneusly this 5 blobs?
all of this circles have same color!
can RR track this blobs for me?
thanks!
Anonymous 15 year
If you could include an example image that would be easier to understand what you are asking for.

If all blobs are circles with the same colors then the only way to track them would be to use the nearest last known blob location as the tracking attribute.

So do you want to know how the blobs are moving from image to image or are you asking how to identify the blobs in the current image (this can be done using the Blob_Filter with the "Create array" checkbox checked which will give you an array of COG's for each blob).

STeven.
mehdi from Iran  [32 posts] 15 year
ok,i exactly need the first case!
"i want to know how the blobs are moving from image to image!"
1)we detect blobs in image A and index the blobs.
2)we repeat this procedure for next frame,too.
now,how can i calculate nearest last known blob location?
if i can calculate this,then i will be able to track all blobs simultaneously!
thanks for attention!
Anonymous 15 year
mehdi,

Please see the just launched blob_tracking module. That should do what you are requesting.

http://www.roborealm.com/help/Blob_Tracking.php

STeven.
mehdi from Iran  [32 posts] 15 year
extremely thanks! :D

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