loading
 
Measuring Depth
Anonymous  [10 posts]
6 years
Hi,

I'm currently working with roborealm to measure some objects in a picture. I want to measure the 3D aspects of the object (X,Y,Z). The picture is a grayscale image which is acquired with a 3D laserscan camera. The grayscale colors are for depth. I've already managed to get some x,y coordinates but I can't seem to find the right module to get the depth, z, coordinate. Is it possible to measure the depth in the picture with roborealm based on grayscale values?

Thanks in advance!

Marco
Anonymous  [10 posts] 6 years
Some information to add:
So far I have filtered my objects from the source image using the module shape_match which gives me the array 'Shapes'. In this array are the coordinates of a box that fits around my shape and the orientation of the object. With these coordinates and the orientation I'm able to measure the shapes in 2D. But I also want to measure the Z-axis, depth.

Is it possible to measure the depth of these filtered objects using the grayscale colors and in a way it is easy to combine with the already acquired 2D information?

Kind regards,

Marco
Anonymous 6 years
Marco,

You have to think of the depth information as intensity ... which is normally what the color of a pixel is. There are various ways to accomplish what you want. Any module that provides the intensity or color of the object would work ... like the Color Statistics module but the trick is to get it to mesh with the current statistics that you have. This will depend on what module you have used to generate the previous statistics. Perhaps you could include that part of your pipeline and we can suggest which module will work? Note that most modules will process objects in the same order ... so you may just add the color stat module and the stats will line up with the previous information ... hard to know without seeing your current pipeline.

STeven.
Anonymous  [10 posts] 6 years
Thank you for your answer. I've gotten one step further. I tried Color Statistics before but I thought it wasn't working because when chose at the scope field for Individual blobs it didn't display any values for the variables but when I write the values to a file they are shown.

I'm not using RR in combination with a robot but I'm using RR for image analysis. With the pipeline I'm currently using i filter 28 blobs using an canny and open filter so I'm then able to do a shape match(with a simplified train image). This results in blobs but they lose their gray values in order to do so. But for me it is important to get the gray values corresponding with the blobs. So I tried to overlay the source image again, with display_image, on the filtered image but then RR doens't see the blobs anymore so I still can't get the gray values.
Do you have an idea how to filter the objects using the simplified shape_match but do maintain the gray image?

I've include my program pipeline with a simplified image.

B.t.w. I'm using RR version 2.30.7(most recent?).

Thanks in advance,

Marco
RR.zip
Anonymous  [10 posts] 6 years
I also have a second question. I'm using filters to detect blobs using shape_match. Is there a module that can write images of these found blobs? So I do not want to write the whole image but seperate images of each blob? So partial image selection based on the found shapes (variable SHAPES) and then write it to individual images.

Marco
Anonymous 6 years
Marco,

Sorry for the delay on this....

Attached is a robofile that will fill your objects (which shape match will still work on) and then use that as a colorize mask (Blob_Colorize) that uses the original image and colors the blob based on the average (or other). In this way the blob becomes a single color based on the original image.

Currently there isn't a elegant way to save each of the blobs into its own image but there is a module we can create that will. Essentially this new module would take an image, split it into X number of other images and run the pipeline from then on with each of those images ... thus if the save image is presented after that module it would just save a single blob image at a time. Let me know if this is still of interest and we'll get that out ASAP.

STeven.
program.robo
Anonymous  [10 posts] 6 years
Hi Steven,

Thank you for this solution! I'm this makes it possible to color the blob with the mean, max/min intensity/color. What I'm trying to achieve is to measure the height of top-end of the blob(potato) and the bottom-end to see if the potato is laying flat on the floor or if that the potato has a certain angle compared to the floor. I can't think of a method to achieve this. Waht i need is to read the min color/intensity of for example the top 4 rows of pixels and 4 bottom rows of pixels. Any way to achieve that?

If it is possible for you to make such a module to save each blob in a separate image file that would be great!

In the sample I put in the above post there is an image with 4 potatoes in it. This is the ideal situation but the potatoes can have an other orientation than 0 degree. To measure eacht potatoe with RoboRealm every potato needs to have a 0 degree orientation so that the size of the potatoe (in pixels) can be determined by using bouding box of the shape_match module. What I'm doing now is analyze the source image for potatoes, shape_match the potatoes with a sample, export the SHAPE array. Then I'm having a 3rd party (created myself) read the SHAPE array for found potatoes with their corresponding orientation. Then my program will counter-rotate the source image for every found orientation and then re-run RR to locate the potatoe again but now with a orientation of 0 degree so it is measurable. But analyzing the counter-rotated source-image takes more time because the file-size is bigger.

Seperating each blob in a single image will reduce processing time I think.

I hope you understand what I'm trying to achieve : )

Now I'm already asking a lot but I have included a sample of what kind of image I'm dealing with. Do you know a way to how it is possible to filter these potatoes in a good way? I saw you changed my canny-close method to canny-fill. I need to at least measure 10% of the total displayed potatoes.

My trial expired but my boss bought me a copy:)

Thanks in advance!

Marco


RR2.zip

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