loading
 
blob identification
Blaz from Slovenia  [6 posts]
14 year
Halo!
I have a problem.
I can not understand why are blobs numbered/ordered in order of the Y- position (I think Y_min) by default. I would like to order them in order of the X-position (COG_X) of each bloob. Is this posible?

bye

 
Anonymous 14 year
Blaz,

Yes, this is possible. What modules are you using to get your results? If you are using the Blob_Filter module you will notice the checkboxes in that interface to change the ordering of the blobs.

Alternatively you could write some VBScript to reorder them. If you provide your robofile we can see what is possible.

STeven.
Blaz from Slovenia  [6 posts] 14 year
Hi

I am using Blob_filter module and I saw the checkbox. The resoults are the same if you check order by x or order by y. I uploaded a simple robofile which detects two blobs. Always is the first the one with lower y coordinate.

VBSript could be one possibility but it is a better and more elegant solution if it works like is working for y coordinate.

I have another problem with RR crashes (mosaic, 2 cameras, crop). But maybe is better to discuss about this in another post.

Blaz


    

program.robo
Anonymous 14 year
Blaz,

The blob filter module has that ability to sort via X but the Geometric Statistics module does NOT. So you need to grab the COG from the Blob_Filter which is stored in a blobs array. See the attached robofile which does order the results correctly.

If you would like to gather statistics together from multiple modules and have then sorted via the COGX we can help with that too. Perhaps we can add that sort X and Y cog into the Statistics modules. Let us know if this would be helpful to you.

You can also post about the crash situation. A robofile to test would be very helpful in eliminating that issue.

STeven.
program.robo
Anonymous 14 year
Hi STeven

If you look at the modul Blob Label. It colours the identified blobs... If we look both pictures every time it colors the object with hihger COG Y (maybe MIN_Y) with the same color. So there is a proces of sorting by Y koordinate or am I wrong...

The problem is that i need to know for example INARIANT_1 of the first and second object. The first is one who has lower COG_X koordinate. I have made a small VBScript program for 2 objects... but if I would like to mesure more than 2 objects it will be a problem.

It is difficult to post a robo file with crash situation (it crashes). I conected two cameras (640x480) so i have 1280 pixels width. I would like to separate this picture in three parts and then proces part by part. So I tried this way:
- Mosaic (CAM1, CAM2)
- Corp (x_start 0, x_end 1280; y_sart 200, y_end 400) "example"
- Marker (all pictures)
- Set variabl (pic1, pic2, pic3)
- If pic1 = 1
- Mosaic (Marker all pictures)
- Corp (X_start 0, X_end 430)
- Marker (pic 1)
- End If
- If pic2 = 2
- Mosaic (Marker all pictures)
- Corp (X_start 430, X_end 860)
- Marker (pic 2)
- End If
- If pic3= 3
- Mosaic (Marker all pictures)
- Corp (X_start 860 X_end 1280)
- Marker (pic 2)
- End If
- moment statistics
-.....

This is just for an idea of the problem. I think that the problem is Corp. When I use it RR crashes (in this combination).

Thanks
Blaz
Anonymous 14 year
Blaz,

You are correct in that the blob label module will label the highest object with the same color but it is because that is the first object encountered when scanning the image. As the labeling algorithm proceeds in the same direction in the image on each new image as long as the same object is the highest in the image it will receive the same color .... BUT as soon as that condition fails (i.e. another object becomes higher) it will switch color. Thus this is not a reliable way of ordering the information.

If you are trying to detect INVARIANT_1 for more than one object you will need to know how to identify the same object in the list each time it is generated. RoboRealm cannot create the exact same order of objects each time as it would need to know which object is which ... but that's the reason for getting the statistics in the first place, i.e. in an attempt to identify the object! As you have noticed just using ordered COG_Y is not a very reliable way of identifying objects.

So how is this done? It will depend on your image. For example, if you know that object 1 is ALWAYS the highest object then you are already done (which we know not to be the case) but if you know that object 1 is ALWAYS the largest object then you have to include the size in the stats and check the array for the largest object and then access INVARIANT_1 of that object. Ie you order the array based on size ... but that may not work either (based on your images above they appear very similar in size).

Another possibility is to use the past location of each blob. For example, once you start tracking you can read in both the initial COG values. On the second new image you would then search all objects for the closest COG for one in the previous image  ... the closest object in both images would then be considered to be the same object and you could then check the INVARIANT_1 and how that has changed. This assumes that the objects are moving slowly relative to each other .... again, the more you know about your project requirements the better you can make the system.

Note that this is essentially what the blob_tracking module does .. it uses various statistics to check to see which blob matches with a previous blob in order to provide a sense of continuity between images. Location is normally a good one .. but not the only one that can be used.

Perhaps you could give us a sense of if the objects move very rapidly around from one image to the next so that we can provide a robofile that would provide a stable INVARIANT_1 for the same object in the same order for each image (unless it disappears or a new object appears).

In terms of the crash can you provide us with a sample image just after the first Mosaic? We can replicate the rest to test. Normally these errors are particular to an image content so having a sample image to test would be very helpful.

Thanks,
STeven.
Blaz from Slovenia  [7 posts] 14 year
STeven,

I sent you an image of what I am trying to analyze. In this picture I have 6 blobs, which are detected with three cameras (this is a mosaic of one camera - just for example). Blobs are almost the same size. I need to know their position and orientation (Geometric and Moment statistics of each blob). Each blob position changes for a delta x < 20 pixels and delta y < 20 pixels. First blob is allways the left one and the last blob is allways the right one. For this reason it would be fantastic if blob label algoritem could detect the firs object, one who has the Xmin. Is possible to change X and Y in your algoritem? Or any other idea?
I forget to tell you that this picture (6 blobs) changes every half second.
I did this program for two blobs (1 camera) and it works good, but I need 3 cam and 6, 7, 8 blobs .... So we came to the problem number two CRASHES. My idea was to make a mosaic with 3 cams and then divide the image in parts. Every part would have 2 blobs to analyze. When is done with the first part pass the information (position and orientation) and start to analyze the next part... till the last part. I think that this is not the best way... Because it firgured out that if you have a mosaic, a crop and than an another crop to take the part of an image to analyze, RR crashes (when changing Crop Dimmensions). I post a print screen jus after crash and the image which I was analyzing is the other image I have posted. If you have any other idea you are wellcome!!!

PS: We finaly bought your program and it is a masterpiece ;-)

Thanks
Blaz




  

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