I would expect the regular zebra to be more accurate, since it's based on the Y component of the original YUV buffer. If regular zebra says there is no over exposure but RGB does, it's probably an artifact of the conversion. If you want accuracy, you would need to calibrate it with actual images (assuming there is a stable relationship between the viewport and raw, which I'm not sure is established.)
yy = img_buf[v+1]; if (conf.zebra_multichannel) { uu = (signed char)img_buf[v]; vv = (signed char)img_buf[v+2]; sel=0; if (!((conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) { if (clip8(((yy<<12) + vv*5743 + 2048)>>12)>over) sel = 4; // R if (clip8(((yy<<12) - uu*1411 - vv*2925 + 2048)>>12)>over) sel |= 2; // G if (clip8(((yy<<12) + uu*7258 + 2048)>>12)>over) sel |= 1; // B } buf[s]=buf[s+1]=cls[sel]; } else if (((conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) buf[s]=COLOR_TRANSPARENT; else buf[s]=(yy>over)?cl_over:(yy<conf.zebra_under)?cl_under:COLOR_TRANSPARENT;
as far i understand yuv its possible that y have a low value and only together with the U and v value it reach a high value.
img = vid_get_viewport_live_fb ( ); triplets_in_bytes = 3 * ( buffer_width * ( row_offset + row ) + ( col_offset + col ) ); yc = img [ triplets_in_bytes + 1 ] * 4096; cb = ( signed char ) img [ triplets_in_bytes ]; cr = ( signed char ) img [ triplets_in_bytes + 2 ]; red = clip ( ( yc + ( 5742 * cr ) + 2048 ) / 4096 ); green = clip ( ( yc - ( 1410 * cb + 2925 * cr ) + 2048 ) / 4096 ); blue = clip ( ( yc + ( 7258 * cb ) + 2048 ) / 4096 );
Started by NewbieToobie General Help and Assistance on using CHDK stable releases
Started by andreluisdealvarenga Feature Requests
Started by pwcal2 Feature Requests
Started by axman « 1 2 » General Help and Assistance on using CHDK stable releases
Started by philmoz General Discussion and Assistance