loading
 
exporting variables
BT  [1 posts]
10 year
Hi : I'm having difficulty getting geometric_statistic variables out of just objects that are shape matched in an image. I have an image that has about 300 blobs in it and by using the shape matching filters for confidence and size etc I get down to 5 matched objects within the image with colored rectangles around the objects. Now, I only want some geometric data on these objects together with the filename that it was matched to. When I setup the shape array in shape matching module I get two numbers at the end of the array in a text file that are meant to define the filename of the match along with other variables - how is this keyed to the filename?. Im guessing I need to use a Vbscript to write out a text file so I can view the results in excel but im not computer program savvy at all- can someone help me do this or point me in the right direction on how to go about it. Also getting certain geometric statistics for only each matched shape with some vb script that can output to a spreadsheet would be really useful.

I have attached my robo file, the simple training set and a test image that has two filtered matches.

Thanks for any help or direction on this, any help would be much appreciated




 

particles db.zip
program.robo
Steven Gentner from United States  [1446 posts] 10 year
BT,

First, download the latest version of RR so we can be sure you are seeing what our tests revealed.

Second, we have to threshold your image since there are a couple pixels that are not quite white. This is hard to notice but if you don't run a threshold the shape matching gets a bit confused as it sees a couple blobs with a different color.

Then, ensure that the shape matching has the White Mask enabled. This will remove all non-matched shapes from the image and should only leave those that are matched against your templates.

It is also VERY important that you either do NOT display any graphics in the shape match module OR select the display as annotation because otherwise the next geometric module will also calculate stats on the PRINTED GRAPHICS! That's the reason the "Display as annotation" exists, i.e. embedding the graphics into the image only AFTER all calculations are done. Otherwise, you will get very confusing results.

Finally, we combined the write to disk script on the VBscript documentation with the shape info looping on the shape match documentation. This can then be used to write a custom formatted file that contains only the stats you want. Note that we just used the area stat as an example. All the others will following a similar method.

New robofile attached to help you along the way.

STeven.

program.robo

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