hi, i have try with apds9960 color output but color accuracy is very poor .
can anyone suggest the high accuracy color sensor .
hi, i have try with apds9960 color output but color accuracy is very poor .
can anyone suggest the high accuracy color sensor .
Object color measurements depend extremely strongly on the ambient illumination.
How did you calibrate the sensor for the lighting, how did you measure "color", and how did you calculate "color accuracy"?
Please describe the test setup and post some examples of the results.
Oops... let me work out calibration with apds9960 and then suggest me about tcs34725 or some other sensor ?
There is some high-accuracy colour sensor out there.
Such as...
These are my recommendations. You may consider them. Thanks.
For accurate results, all sensors require calibration.
Can you help with pice of code and further I will work
Please answer all the questions in post #2.
#include <Wire.h>
#include <SparkFun_APDS9960.h>
// Global Variables
SparkFun_APDS9960 apds = SparkFun_APDS9960();
uint16_t ambient_light = 0;
uint16_t red_light = 0;
uint16_t green_light = 0;
uint16_t blue_light = 0;
void setup() {
// Initialize Serial port
Serial.begin(9600);
Serial.println();
Serial.println(F("--------------------------------"));
Serial.println(F("SparkFun APDS-9960 - ColorSensor"));
Serial.println(F("--------------------------------"));
// Initialize APDS-9960 (configure I2C and initial values)
if ( apds.init() ) {
Serial.println(F("APDS-9960 initialization complete"));
} else {
Serial.println(F("Something went wrong during APDS-9960 init!"));
}
// Start running the APDS-9960 light sensor (no interrupts)
if ( apds.enableLightSensor(false) ) {
Serial.println(F("Light sensor is now running"));
} else {
Serial.println(F("Something went wrong during light sensor init!"));
}
// Wait for initialization and calibration to finish
delay(500);
}
void loop() {
// Read the light levels (ambient, red, green, blue)
if ( !apds.readAmbientLight(ambient_light) ||
!apds.readRedLight(red_light) ||
!apds.readGreenLight(green_light) ||
!apds.readBlueLight(blue_light) ) {
Serial.println("Error reading light values");
} else {
Serial.print("Ambient: ");
Serial.print(ambient_light);
Serial.print(" Red: ");
Serial.print(red_light);
Serial.print(" Green: ");
Serial.print(green_light);
Serial.print(" Blue: ");
Serial.println(blue_light);
}
// Wait 1 second before next reading
delay(1000);
}
for Red: Red suppose to be rgb(255,255,0)
i can map the measured value and bring down to 0 to 255 range but pure RED having interference of green and blue light . How to nullify the interference
Ambient: 9501 Red: 8458 Green: 591 Blue: 1380
Ambient: 9738 Red: 8630 Green: 601 Blue: 1416
Ambient: 9389 Red: 8381 Green: 597 Blue: 1384
Ambient: 9371 Red: 8367 Green: 585 Blue: 1363
Ambient: 9471 Red: 8405 Green: 594 Blue: 1389
Ambient: 9926 Red: 8743 Green: 609 Blue: 1443
for Yellow: Yellow suppose to be rgb(255,255,0) and how to find the combination since green not having good value .
Ambient: 4202 Red: 2583 Green: 882 Blue: 547
Ambient: 4224 Red: 2577 Green: 889 Blue: 555
Ambient: 4001 Red: 2446 Green: 846 Blue: 528
Ambient: 4205 Red: 2538 Green: 881 Blue: 558
Ambient: 4136 Red: 2534 Green: 868 Blue: 541
Ambient: 4096 Red: 2522 Green: 855 Blue: 533
i didn't made any calibration till now with white and black .
Nonsense. For 8 bit RGB values, (255,255,0) is saturated yellow.
Describe the light source, the setup and what you are measuring. Post a photo of the setup.
sorry typing mistake Red suppose to be rgb(255,0,0)
{
for Red: Red suppose to be rgb(255,255,0)
Nonsense. For 8 bit RGB values, (255,255,0) is saturated yellow.
}
Light White LED
Most of those colors are pastels and would not be suitable for primary color calibration.
Only two of them, the bright yellow (next to white) and green (bottom left), might be suitable standards for calibration.
What is the range of RGB values for several measurements with each of those samples?
hi. let me come back with RGB values for several measurements with each of those samples incase necessary i will buy colour card .
before that one question:
What is your suggestion about calibration procedure like .
suggest me if my understating is wrong
The sensor just reports how much light is receives in three color bands, which depends of course on illumination color and intensity.
The first step is to correct for illumination intensity using the clear channel, e.g. do this for all three color channels:
float R = (255.*red_light/ambient_light); // same for G and B
The second step is to decide on standards for the colors. Record ranges of R, G, and B for each of the standards, under expected illumination conditions, and check for overlaps. If no overlaps, the sensor is calibrated.
Third step: make a lookup table that returns a color given some R, G, and B values.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.