How to calibrate a color sensor? - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: November 10, 2017, 07:34:07 pm
content: I have a spare TCS3400 chip. It would fairly trivial to build a small PCB with it with an STM32F070F6 to turn it into a USB color sensor. (There is even a USB HID usage page just for such color sensors...)Now I need to calibrate it. How?* What unit to use in the HID report?* Correlating from the output of TCS3400 chip and this HID report, what kind of transfer function do I need to apply? Linear? Quadratic? Cubic? Sinusoidal? How should I parameterize this transfer function for adjustments during calibration?* How to get it calibrated? What is the proper transfer standard for this calibration? An RGB LED? Or should I send my monitor (Dell P2415Q, which came with a color calibration certificate) to a cal lab?* Is this the proper tool, with or without calibration, to adjust the color profile of monitors? Is it possible to adjust cameras using this or the created transfer standard then? Or color reference cards?

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: November 11, 2017, 05:14:58 am
content: A color calibration lamp or perhaps sunlight at noon?

author: Tom45
author_rank: Frequent Contributor
timestamp: November 11, 2017, 06:00:22 am
content: You could use a color reference target such as the IT8 available from:http://www.targets.coloraid.de/It comes with reference values for each of the 264 patches.As Blueskull said, the light used to illuminate the IT8 target is important. The reference CD that comes with the target may have information on the lighting used when preparing the reference values for the target. In any case you should use a light source with a continuous spectrum such as sunlight or tungsten lamps. Stay away from light sources such as LED or florescent that has a discontinuous spectrum.

author: rdl
author_rank: Super Contributor
timestamp: November 11, 2017, 06:05:49 pm
content: When I was still working in the paint business, most of our color matching equipment was either X-Rite or Datacolor. The standards used to calibrate the equipment were small pieces of glazed ceramic tile. I'm sure there are important differences between measuring reflected color vs. emitted color. It seems like the reference standard would need to be transparent and illuminated by a calibrated light source.

author: technix
author_rank: Super Contributor
timestamp: November 11, 2017, 06:54:08 pm
content: Since a lot people mentioned calibrated light source, does the broad daylight in a cloudless sunny noon count?

author: Tom45
author_rank: Frequent Contributor
timestamp: November 12, 2017, 03:03:26 am
content: Quote from: technix on November 11, 2017, 06:54:08 pmYes.

author: SeanB
author_rank: Super Contributor
timestamp: November 12, 2017, 05:27:07 am
content: That is almost constant, but can have slight variances due to atmospheric aerosols that absorb slightly different amounts of light.

author: technix
author_rank: Super Contributor
timestamp: November 12, 2017, 05:47:12 am
content: Quote from: SeanB on November 12, 2017, 05:27:07 amSo to narrow down the constraints, clear day with less than 5% clouds, an AQI of 20 or less, 10AM to 3PM?

author: bopcph
author_rank: Contributor
timestamp: November 13, 2017, 08:59:44 am
content: You should be aware that there is a huge difference in calibrating a sensor for measuring the color of light and measuring the color of a surface (reflected color, apparent color).I guess that you all know that when mixing light, you mix red, blue and green, as with good old CRT color tv's, LCD screens and RGB LED's.While when you mix colors as in printing, and in reality also in paint, are mixing Cyan, Magenta, Yellow and "K" (black) (CMYK).When using sunlight for any type of color reference the rule of thumb is to use a slight cloudy day. High, bright sunshine is only useful for testing max output af a solar cell system.Bright sun light will give you too much blue and UV and sun light is NOT intensity linear over the visible spectrum.So if you need to measure the exact radiometric intensity of one color (wave length) against another sun light is NOT the right reference :-/Would be convenient though :-)When you calibrate your LCD/LED monitor you are calibrating for a specific type of task - graphic work that ends as a printed brochure or photographic work that ends on hi-gloss paper orcalibration when the work is for movie and video production or photographic work for projected shows.Philips did a color calibrator, mainly for CRT's - maaaaany years ago ;-). It was developed in DK (that is why I know) and it was pretty expensive and often used for "mega-screen" setups for concerts.I can't remember how many sensing head they had on the largest system, but many and automatic calibration of the CRT's. It only took a few hours to sync the colors of a 10 by 20 CRT wall and not days.

author: technix
author_rank: Super Contributor
timestamp: November 13, 2017, 11:04:55 am
content: Quote from: bopcph on November 13, 2017, 08:59:44 am20% clouds, 20 or less AQI? ( AQI, air quality index, indicates aerosol level, and is part of the weather forecast in China)

author: Zero999
author_rank: Super Contributor
timestamp: November 13, 2017, 11:34:04 am
content: Will the colour sensor be used with different sources of background illumination? If so, then it will need to be adjusted, each time the lighting is change, to take that into account.

author: bopcph
author_rank: Contributor
timestamp: November 13, 2017, 03:35:47 pm
content: Quote from: technix on November 13, 2017, 11:04:55 amUnfortunately you are right, but that rule of thumb doesn't take into account the special conditions in Mexico city, Indonesia during forest clearing, larger cities in China and others

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: November 13, 2017, 06:23:07 pm
content: NIST has a ton of stuff on photometric calibration if you search. Here's one-http://nvlpubs.nist.gov/nistpubs/jres/53/jresv53n2p113_A1b.pdf

author: technix
author_rank: Super Contributor
timestamp: November 13, 2017, 07:27:27 pm
content: Quote from: bopcph on November 13, 2017, 03:35:47 pmWelp I live in Shanghai, the biggest city of mainland China... The weather forecast does provide data on cloud density and AQI so it should be a matter of patience to fins den appropriate day, with 20%-30% clouds and less than 20 AQI.

author: bopcph
author_rank: Contributor
timestamp: November 16, 2017, 02:10:20 am
content: I will be worried and concerned about my health the day the danish weather forecast includes AQI and not just UV index

author: technix
author_rank: Super Contributor
timestamp: November 16, 2017, 07:26:34 am
content: Quote from: bopcph on November 16, 2017, 02:10:20 amEver since the severe smog of Beijing a few years ago AQI have been part of Chinese weather forecasts. And if local government failed to keep the yearly and monthly average AQI down it would be heavily fined by the central government, and as of the local officials, they may lost their job from bad AQI.