When working on my beer recognition project BiBirra I’ve encountered problems loading images that had a transparent background. OpenCV by default mess this images up, and this is especially problematic when we extract SURF features from the loaded image.
The key idea is to load the image with the flag cv2.IMREAD_UNCHANGED that tells OpenCV to keep the alpha (transparency) channel. Then we save separately the alpha channel as a binary mask for latter use.
Notice that when the original image has no alpha channel the mask will be simply returned as None.
Now it is possible to correctly extract SURF features from the masked image
A few weeks ago I was in a supermarket with my girlfriend, we were invited to a dinner and we wanted to bring wine. Neither of us is a wine expert but she had a fantastic ace in the hole, she pulled out her phone, took a picture of the wine label and immediately got a description and a review of that bottle. I was impressed by the power of that app (it is called ViVino) and she challenged me to build something similar.
I accepted the challenge but added a few personalizations to it:
I often find myself in a situation where I need to get data from a website that has no API or RSS feed. There exists many different web scraping libraries but I’m unsatisfied, I want something capable of:
This motivated me to create a simple scraping library called Raschietto (the Italian word…
One of my favorite painting techniques is pointillism, a technique of painting in which small distinct dots of color are applied in patterns to form an image.
This technique relies on the ability of the eye and mind of the viewer to blend the color spots into a fuller range of tones. The juxtaposition of different colors make them more vivid, giving the whole image more vibrancy.