Detect Image Color Scheme
Learn to extract features related to colors in an image using Azure Computer Vision service.
We'll cover the following
Introduction
In this lesson, we’re going to use the computer vision service to identify the color-related features in the image. The Computer Vision service identifies five features related to the colors present in the image:
-
Dominant color in the image
-
Dominant foreground color in the image
-
Dominant background color in the image
-
Whether the image is black and white
-
Accent color (most vibrant color) present in the image.
Implementation
We’ll again be using the analyze_image()
function from the ComputerVisionClient
class. We’ll pass the URL of an image and in this lesson, we’ll only pass color
as the feature to be extracted as we want to identify the color scheme present in the image.
Similarly, we can also use the analyze_image_in_stream()
function if we’re reading the image from the local machine and then pass the image in bytes format to this function as a parameter.
Now let’s move on to the implementation of this functionality.
Get hands-on with 1400+ tech skills courses.