06-17-2024 02:25 AM
Hi,
I’m working on differentiating a type of mango (Harumanis Perlis) from other mango varieties such as Sala, Nam Dok Mai, and Harum Manis Kemboja using image processing techniques in NI Vision Assistant.
Here are their pictures, in this order: Harumanis Perlis, Sala, Nam Dok Mai and Harum Manis Kemboja. Sala has elongated and somehow like a S shape. Nam Dok Mai is also elongated in shape but with a pointed tip.
Harum Manis Kemboja is closest to Harumanis Perlis among these varieties in terms of shape, but Harumanis Perlis has a unique tail shape with two tips or peaks. I tried to illustrate this characteristic:
At the moment I am doing shape matching on mangoes using an ideal Harumanis Perlis as template. It's a binarized image of second picture above this line.
The result is it is difficult to decide the threshold scores to classify if a mango is Harumanis Perlis. Is there a better way to capture the unique characteristics? Right now, I'm thinking of doing a second level shape matching but with ROI, on the bottom right of the images.
Any advice, resources, or sample scripts would be greatly appreciated! Thank you in advance for your help.
06-17-2024 11:18 AM
You could try the ratio between surface and circumference.
NI Vision's blob detection has all sort of measurements on the resulting blobs, I thing you get them during labeling.
If it's hard for humans, it will be hard for an algorithm. The shape difference could even be in the noise (e.g. just a probability factor in the distinction, but not deterministic).
A tactic is to collect all sorts of data from a large dataset and let statistical software pick the key features. I never done that, but I've got the results of such a routine. You would need a) lots of features and b) lots of representative, classified\labeled, data.
You could go AI, although you'd be pretty much on your own (there's a commercial AI toolkit for LV, but there are .NET libraries too). The AI would need a large classified\labeled data set too though. AFAIK, there's not much intelligence here, just fancier statistics.