Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mongshil553/computer-vision-hue-entropy-utilizing-sliding-window
Computer Vision; Deciding whether food is mixed enough compared to selected sample image.
https://github.com/mongshil553/computer-vision-hue-entropy-utilizing-sliding-window
computer-vision food opencv
Last synced: 3 days ago
JSON representation
Computer Vision; Deciding whether food is mixed enough compared to selected sample image.
- Host: GitHub
- URL: https://github.com/mongshil553/computer-vision-hue-entropy-utilizing-sliding-window
- Owner: mongshil553
- Created: 2024-06-26T16:36:43.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-31T04:54:05.000Z (4 months ago)
- Last Synced: 2024-07-31T06:38:14.271Z (4 months ago)
- Topics: computer-vision, food, opencv
- Language: Python
- Homepage:
- Size: 29.3 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Computer-Vision-Food-Mixture-Level-Decision-System
Utilizing Computer Vision to decide whether food is mixed enough compared to selected sample image.
Result
When given a standard image, the system decides whether entry image is well mixed or lacks mixed level than the standard image.
This is an image of actually using a camera to evaluate whether current food is well mixed. "Good" with green background means food mixed level is high enough, and "Bad" with red background means food is not yet mixed well enough.
Utilizing Hue Entropy
Key idea to solving this problem is Using Hue compoment of an image. Convert the RGB Image into HSV Image, Getting Hue, Saturation, Value information. Hue is mainly used to define what color the bit is. By calculating the Entropy of Hue, we get to know how diverse the colors are in an image.Via Using 3 Kernels; 20% window size, 25% window size, 30% window size, we calculate the final entropy for the specific pixel.
Following is the example of Entropies calculated for 4 image examples.
Finally, we calculate the standard deviation of the entropies in the image. If the standard deviation is high, it means that particular hue values occur in specific region, not prevailing in the entire image. On the other hand, if the standard deviation is low, hue entropies does not change a lot in the image thus, hue values are uniform throughout the entire image.
Code Structure
1. Image Gaussian Filtering(Smoothing), Image subsampling(reduce size)
2. Convert RGB Image to HSV
3. Hue domain Median Filtering; Used for reducing noise in calculating entropy, where (1,2,3) entropy is higher than that of (2,2,2)
4. Evaluate entropy for each one of 3 sliding window, then calcuate the average which will be the entropy for that specific pixel.
5. Run Gaussian Filtering to reduce noise.
6. Calcuate standard deviation for the hue entropies.
Acknowledgement
This system does not guarantee correct analysis of given image. The result could differ from the changes in light setting, resolution of the camera, image noise, unwanted parts such as plate included in the image, etc. Also, the code is very dirty.
Image Sources
Image used in this project is both collected from the Internet and created by our teammates.
Sources of Images collected from the Internet are the following:
https://www.youtube.com/watch?v=X7ozj9FPvNA
https://blog.naver.com/kutty1945/222251561774
https://www.10000recipe.com/recipe/1395916