mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #298 from kwagyeman/sensor_fixes
Update invariant table.
This commit is contained in:
commit
075cfbc0de
@ -1118,7 +1118,7 @@ void imlib_illuminvar(image_t *img) // http://ai.stanford.edu/~alireza/publicati
|
|||||||
|
|
||||||
float chi_x = (r_lin_sharp_div_log * 0.7071f) + (g_lin_sharp_div_log * -0.7071f) + (b_lin_sharp_div_log * 0.0000f);
|
float chi_x = (r_lin_sharp_div_log * 0.7071f) + (g_lin_sharp_div_log * -0.7071f) + (b_lin_sharp_div_log * 0.0000f);
|
||||||
float chi_y = (r_lin_sharp_div_log * 0.4082f) + (g_lin_sharp_div_log * 0.4082f) + (b_lin_sharp_div_log * -0.8164f);
|
float chi_y = (r_lin_sharp_div_log * 0.4082f) + (g_lin_sharp_div_log * 0.4082f) + (b_lin_sharp_div_log * -0.8164f);
|
||||||
int chi_int = IM_MAX(IM_MIN(fast_roundf(fast_expf((chi_x * 0.9326f) + (chi_y * -0.3609f)) * 42.99f), COLOR_GRAYSCALE_MAX), COLOR_GRAYSCALE_MIN);
|
int chi_int = IM_MAX(IM_MIN(fast_roundf(fast_expf((chi_x * 0.9326f) + (chi_y * -0.3609f)) * 127.5f), COLOR_GRAYSCALE_MAX), COLOR_GRAYSCALE_MIN);
|
||||||
#endif
|
#endif
|
||||||
IMAGE_PUT_RGB565_PIXEL_FAST(row_ptr, x, COLOR_R8_G8_B8_TO_RGB565(chi_int, chi_int, chi_int));
|
IMAGE_PUT_RGB565_PIXEL_FAST(row_ptr, x, COLOR_R8_G8_B8_TO_RGB565(chi_int, chi_int, chi_int));
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -44,8 +44,7 @@ for i in range(65536):
|
|||||||
|
|
||||||
chi_x = (r_lin_sharp_div_log * 0.7071) + (g_lin_sharp_div_log * -0.7071) + (b_lin_sharp_div_log * 0.0000)
|
chi_x = (r_lin_sharp_div_log * 0.7071) + (g_lin_sharp_div_log * -0.7071) + (b_lin_sharp_div_log * 0.0000)
|
||||||
chi_y = (r_lin_sharp_div_log * 0.4082) + (g_lin_sharp_div_log * 0.4082) + (b_lin_sharp_div_log * -0.8164)
|
chi_y = (r_lin_sharp_div_log * 0.4082) + (g_lin_sharp_div_log * 0.4082) + (b_lin_sharp_div_log * -0.8164)
|
||||||
|
chi_int = max(min(int(round(math.exp((chi_x * 0.9326) + (chi_y * -0.3609)) * 127.5)), 255), 0)
|
||||||
chi_int = max(min(int(round(math.exp((chi_x * 0.9326) + (chi_y * -0.3609)) * 42.99)), 255), 0)
|
|
||||||
|
|
||||||
if not (i % 16):
|
if not (i % 16):
|
||||||
sys.stdout.write(" ")
|
sys.stdout.write(" ")
|
||||||
@ -56,4 +55,3 @@ for i in range(65536):
|
|||||||
sys.stdout.write(",\n")
|
sys.stdout.write(",\n")
|
||||||
else:
|
else:
|
||||||
sys.stdout.write("\n};\n")
|
sys.stdout.write("\n};\n")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user