08-25-2015 05:21 AM
Hi All,
I have a grayscale image and the mask of the particles that I am interested in.
I want to find the entropy value of the particles selected in the mask image.
I looked up TSA entropy VI in signal processing toolkit, however I could not find anything for images.
How can I create this?
Test images are attached. I want to find out the entropy value for each coin shown in the image.
Regards
Aveo
08-25-2015 06:25 AM - edited 08-25-2015 06:30 AM
Hello,
use the attached .vi to calculate the image entropy.
Of course you need to process each coin seperately, but as you've masked them, this is trivial.
P.S.: Since log has a base of 2, this is called Shannon entropy. You can use other bases, e.g. e or 10.
Best regards,
K
08-25-2015 07:02 AM
Hi,
Thanks for the vi.
This is great. But how do I tackle the multiple particles problem?
One solution would be to run a for loop that creates the mask of one particle in each iteration and then uses your vi to find out entropy.
However this might take a lot of time.
Do you have any other alternative for multiple particles?
Regards
Aveo
08-25-2015 07:37 AM
Hello,
I don't see how can the calculations for each particle be avoided.
Regarding the speed, it boils down to your specifications. How much speed do you need? I quickly tested an image with 1000 particles (size ~3000x2000 pix) and the calculation time was ~100 ms (low to midrange laptop). That's still 10 frames/s. This includes also thresholding and particle analysis (to get the actual roi's) - see below:
This way, you can also track the objects that deviate from average entropy for example.
Best regards,
K
08-25-2015 07:44 AM
Hi,
Even I believe there is no way to avoid the loop!