XYZ calibration tunning
This commit is contained in:
parent
3b26e1635a
commit
da43aa0250
1 changed files with 3 additions and 3 deletions
|
@ -369,7 +369,7 @@ void xyzcal_histo_pixels_32x32(uint8_t* pixels, uint16_t* histo)
|
||||||
void xyzcal_adjust_pixels(uint8_t* pixels, uint16_t* histo)
|
void xyzcal_adjust_pixels(uint8_t* pixels, uint16_t* histo)
|
||||||
{
|
{
|
||||||
uint8_t l;
|
uint8_t l;
|
||||||
uint16_t max_c = histo[0];
|
uint16_t max_c = histo[1];
|
||||||
uint8_t max_l = 1;
|
uint8_t max_l = 1;
|
||||||
for (l = 1; l < 16; l++)
|
for (l = 1; l < 16; l++)
|
||||||
{
|
{
|
||||||
|
@ -381,10 +381,10 @@ void xyzcal_adjust_pixels(uint8_t* pixels, uint16_t* histo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBG(_n("max_c=%2d max_l=%d\n"), max_c, max_l);
|
DBG(_n("max_c=%2d max_l=%d\n"), max_c, max_l);
|
||||||
for (l = 15; l > 8; l--)
|
for (l = 14; l > 8; l--)
|
||||||
if (histo[l] >= 10)
|
if (histo[l] >= 10)
|
||||||
break;
|
break;
|
||||||
uint8_t pix_min = (max_l + 1) << 4;
|
uint8_t pix_min = (max_l << 4) / 2;
|
||||||
uint8_t pix_max = l << 4;
|
uint8_t pix_max = l << 4;
|
||||||
uint8_t pix_dif = pix_max - pix_min;
|
uint8_t pix_dif = pix_max - pix_min;
|
||||||
DBG(_n(" min=%d max=%d dif=%d\n"), pix_min, pix_max, pix_dif);
|
DBG(_n(" min=%d max=%d dif=%d\n"), pix_min, pix_max, pix_dif);
|
||||||
|
|
Loading…
Reference in a new issue