An awesome app "Megabite" that automatically recognizes photos of food and rearranges them to "face"
As you can see in the fact that the number of people putting effort into making character valve is increasing, it makes me feel happy if the appearance of what we eat at lunch time is beautiful or interesting. So, the developerAaron RandallMr. made an application that recognizes the shape of food and rearranges it face to face when taking a meal "Megabite"is.
You can understand what kind of application Megabite is by seeing the following movie in one shot.
Megabite - YouTube
A screenshot of the iPhone appeared in the movie. Tap the application called "Megabite" on the screen ... ...
The following screen will be displayed. Tap the word "Take a photo".
Then the camera starts up. The dishes with bacon, fried eggs, tomatoes etc are shown. After a short time……
The picture taken on the first screen was displayed.
When the plate goes round and round ... ...
The picture got messed up.
When I noticed, my face was finished.
You can see how Megabite works like this by looking at Randall's blog.
Megabite | Aaron Randall
http://aaronrandall.com/blog/megabite/
First, when the user shoots food, the app cuts out only the dishes and the ones on the table that are on the table.
Continue to the stage of recognizing the outline of each item on the plate.Canny Edge Detector(Images 1 to 5), and grasp the outline etc. with the findContours function (image 6). After eliminating unnecessary things such as non-convex contour (image 7), filter out overlapping contours by filtering (image 8).
Next, take out each food from "Image 8" of the above image and calculate a rectangle with the smallest area surrounding the food while turning the food.
For example, in the case of toast, by rotating, the area of the rectangle changes as shown in the graph below. When the red line is drawn, when the rectangle becomes the minimum area.
When all the foods are processed as above, it looks like this.
In the application, templates of parts arrangement of "face" are built in, and food is arranged as each part. The right most template in the above picture is divided into 6 parts of eyes, nose, mouth, ears ......
Specifically, bread is in the mouth, fried eggs are seen in eyes, bacon in the ear, and tomatoes are regarded as the nose.
Then rotate the food according to the orientation of the polygon in the template and let it go ......
The usual lunch will be in the face in no time.
Please note that Megabite is not delivered on the App Store, etc., but the code is published on GitHub.
GitHub - Aaron Randall / Megabite: Turn a photo of your food into a face
https://github.com/AaronRandall/Megabite
Related Posts: