Skip to Content
Mastering Computer Vision with TensorFlow 2.x
book

Mastering Computer Vision with TensorFlow 2.x

by Krishnendu Kar
May 2020
Beginner to intermediate
430 pages
10h 39m
English
Packt Publishing
Content preview from Mastering Computer Vision with TensorFlow 2.x

Matching face color with foundation color – color matching technique

For this method, the RGB image is not converted into grayscale; instead, the color intensity value of each of the seven face colors and 10 foundation colors is determined using the following Python code (repeated for each case):

facecol1img = Image.open('/…/faceimage/facecol1.JPG')facecol1arr = np.asarray(facecol1img)(mfc1, sfc1) = cv2.meanStdDev(facecol1arr)statfc1 = np.concatenate([mfc1, sfc1]).flatten()print ("%s statfc1" %(statfc1))

The output has six elements. The first three are mean RGB values, while the next three are standard deviations of the RGB value.

The intensity difference between face and foundation color is calculated as follows:

Let's have a look at the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Computer Vision with TensorFlow 2

Hands-On Computer Vision with TensorFlow 2

Benjamin Planche, Eliot Andres

Publisher Resources

ISBN: 9781838827069Supplemental Content