I have two images of same crop, of the different stage of it's growth. How do we compare two images and find the percentage difference from one stage to another?
comparison should be on the basis of the crop color from one stage to another excluding the background color.
Thanks in advance.
Maen BadwanPosted Oct 20, 2016, 11:30 AM
This should give you an indication about the area of all elements in the image other than the background. Now, you can compare the pixel counts between the images, and you can consider the images with larger pixel count values have larger growth stage.
Note that you can use LEADTOOLS .Net classes to accomplish the above approach by calling the RasterImage.AddColorToRegion method and pass to it the background color with RasterRegionCombineMode.SetNot parameter. This should exclude the background color from the region. After this, you can get the region's pixel count using the RasterImage.CalculateRegionArea method. You can find more details here:
https://www.leadtools.com/support/forum/posts/m14289-Image-Comparison#post14454
Note that this is general information and the details might be changed or modified depending on the images that you use.
Disclaimer: I am an employee of this library