05-12-2016 04:49 PM
It doesn't make sense to me to be correlating against your input image.
If I understand you correctly you want the "best" threshold. So your correlation should be not against the input image (which is not a measure of the best threshold) but against another binary image which defines what you would hope the output of the thresholding would be. Maybe you need to define this optimal image manually.
You can do the correlation using IMAQ Correlate, but there might be better or simpler ways to define the quality of the threshold. For example, you might say you want to maximise the number of threshold pixels that are also selected in the optimal image, and minimise the number that are only in one image - this can be computed just by counting.
But in any case, you need some definite idea of what the threshold should be giving so that you can measure how close it is to that, and the input image is not that target.
05-13-2016 01:51 PM
05-13-2016 06:26 PM
hi gregs , can you make it more simplified to me ? i couldn't understand you exactly , thanks
05-13-2016 07:05 PM
use this vi to compare bettwen throshold
05-14-2016 05:03 AM
Hi Hatef ,
something wrong in the program , it doesn't work properly, can you take some screenshots so i can see the results please ?
05-14-2016 11:55 AM
To do what you want, just multiply the two images together using IMAQ Multiply, then get the average pixel value using IMAQ Quantify.
This won't really help you, though. The larger the thresholded areas are, the larger the correlation value will be. Even if you subtract an average value from the original image, the information won't be useful. Everything will just shift accordingly.
Bruce
05-14-2016 07:21 PM - edited 05-14-2016 07:23 PM
I compare to different t threshold ing method with this vi
for example image bellow show that if you use inter- class variance method you will be have some more pixel to be inside the threshold that using moment method
the white pixels in the image show the pixel that are inside the threshold range for inter class variance but is not inside the range of threshold for moment
05-14-2016 07:27 PM
Also this vi test result show that there is no difference to your image to use wheatear entropy or moment method the result will be same the black image of difference show that there is no difference for your image in this two method
05-15-2016 05:36 AM
good morning hatef ,
in order to prove the best thresholding method i need to compute a degree of resemblance , seeing the difference only won't help , i need a computed result that proves the efficiency of the threshold method
05-15-2016 04:09 PM