09-27-2013 08:34 AM
I am currently using NI Vision Builder AI (2012) to analyse a series of images, and when developing suitable inspections I have noticed that the results are non repeatable. Currently I am using various analysis measures such as measure colour, pixel count, and edge strength and using the data logging function. The problem is that if I say double click one step as if to edit it, click forward to the next image without changing anything, click OK and then run all the analysis again I get different results.
For things such as pixel count this is relatively minimal -anywhere from .0001 to around 3 when dealing with figures around 200- but for edge strength in particular these vary by 10-20 at a time, and sometimes it won't even find an edge which then is seen at over 40 (and the edge strength threshold is set well below this). If this is unavoidable then i can run many trials and average the results, but this will be time consuming as it also involves faux-editing the steps.
Mainly I want to know if this is common and to be expected, and if there is a known percentage error, or perhaps I can change the programme setup to try and mitigate the problem?
Thanks!
Solved! Go to Solution.
09-28-2013 12:17 PM
I think you need to post your script, and sample images to have this question answered.
When looking at a given image, and running analysis using ANY routine that does not alter the original image, you should ALWAYS get the exact same result.
There are only two posibilities: You have either found a bug in vision builder (this is not unheard of), or are overlooking something in your script.
On a live image from a camera, you can expect variations because the camera sensor has inherent noise that alters the content of the image slighly from frame to frame.
10-01-2013 05:16 AM
Hi John,
Thanks for your reply.
I'm new to vision builder so I have a feeling it probably is something I'm doing wrong, just not sure what!
Anyway it's a series of thermal images I am trying to analyse- as below, and these are saved on hard drive rather than acquired directly from a camera, so I am always the same set of images (I'm using 8 each time)
I have also attached my vbai file. It's a little messy still I'm afraid.
I can even close vision builder and reopen and run the inspection and it is fine, but if I 'edit' one of the states, click run state once, OK without editing and then run the full inspection my data logging files will show different results. I first noticed this when clicking through edge strength results to see if there was a trend when building the file and noticed I was never getting back round to the same results.
I have just tried this again and attached the results I'm getting. You can see that I clicked into the first find edge but not the 2nd and 3rd and the results have changed, however I did not alter any of the settings.
Any thoughts?
10-01-2013 08:49 AM
Can you attach your original 8 images? I can't reproduce this with the screenshot of your thermal image.
Thanks,
Brad
10-01-2013 09:04 AM
Hi Brad,
Have attached as a zipped file, would only let me add 3 attachments.
Thanks,
Ellen
10-03-2013 04:29 PM
Thanks for the images. I have reproduced this problem and we will look into this right away.
Thanks,
Brad
10-04-2013 02:03 PM
The good news is that we found what the problem is. When you edit a step that is using a coordinate system and the current image is not the same as the one used when the step was initialy configured, the ROI gets transformed to the new position and the step updates the parameters used to this new position when you press OK. Due to rounding errors that occur when the transformed ROI is caluclated, the new base coordinate system may not result in the same ROI positions. ROIs use integers, and so we round to the nearest integer, but it may not result in exactly the same positions that the original base coordinate system produced. This can lead to the new base coordinate system of the step being off by up to 1 pixel and causes the ROI to process a slightly different part of the image
For a given inspection/images, the results will not change if you don't edit the step, so that's important.
If you edit a step, but don't want to make any changes, press Cancel instead of OK, and all the settings will be the same.
We will investigate a real fix for this issue that involves only updating the base coordinate system when the user redraws the ROI, but the bad news is that this fix won't be in the version of Vision Builder AI we are about to release.
I'm sorry for this discrepancy and we plan to fix this in the future.
Thanks,
Brad
10-07-2013 03:22 AM
Hi Brad,
OK, thanks for looking into that for me- I suspected it was something to do with the coordinate system but wanted to check I hadn't made an error elsewhere.
Thanks for your help,
Ellen