S
S
sstepashka2013-04-12 09:13:19
Objective-C
sstepashka, 2013-04-12 09:13:19

Determining the shade from a photo?

Hey Habr!
There was a task of determining the color (shade) of an object from a photograph. There is a set of templates (standards) and you need to determine the closest of the templates from the photo. At the moment, it is done as follows, in the same way I generate a set of colors from templates:
1) Remove unnecessary colors from the image (the range was determined empirically).
2) We calculate the average color of the image (we do not take into account the remote ones).
3) I calculate according to the CIEDE2000 algorithm ( en.wikipedia.org/wiki/Color_difference).
4) From this I choose the closest in value (the smallest value).
The problem is that photos taken under lighting other than the reference have the wrong average color. At this stage, is it necessary to somehow bring to one degree of illumination (White Balance)?
Maybe there are other ways to determine the shades?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lev Lybin, 2013-04-12
@lybin

courses.graphicon.ru/files/courses/vision/2010/cv_2010_02.pdf

A
Alexey Huseynov, 2013-04-12
@kibergus

What do you actually want to do? What do you call the color of an object? And how different lighting spectra do you allow? How accurate are you wanting to get?
You can try to get some kind of approximation, if you force a special calibration target with colored squares to be placed next to the object. Just from a photo, you won’t restore anything at all, even if you have a RAW photo without any adjustments. I can easily give an example when when changing the lighting, the reference gray cards do not change their hue, but other objects become completely different. It is enough to use line spectra or, for example, fluorescent paints and add ultraviolet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question