The following lines in raspiraw.c:
if (cfg.exposure_us != -1)
{
cfg.exposure = ((int64_t)cfg.exposure_us * 1000) / sensor_mode->line_time_ns;
vcos_log_error("Setting exposure to %d from time %dus", cfg.exposure, cfg.exposure_us);
}
Does not work well for the ov5647 since the register need scanlines of 1/16.
The following works ok.
if (cfg.exposure_us != -1)
{
cfg.exposure = 16*((int64_t)cfg.exposure_us * 1000) / sensor_mode->line_time_ns;
vcos_log_error("Setting exposure to %d from time %dus", cfg.exposure, cfg.exposure_us);
}
The documentation of the ov5647 does not clearly state so, but ov5648 does and when testing the ov5647 it was clear that the set exposure time was not correct.
I'm not sure how the other supported camera-modules work but I guess the configuration structs need some sort of new factor integer to enable a correct time-to-scanline conversion.
Any thoughts on this?
/Gustav
The following lines in raspiraw.c:
if (cfg.exposure_us != -1)
{
cfg.exposure = ((int64_t)cfg.exposure_us * 1000) / sensor_mode->line_time_ns;
vcos_log_error("Setting exposure to %d from time %dus", cfg.exposure, cfg.exposure_us);
}
Does not work well for the ov5647 since the register need scanlines of 1/16.
The following works ok.
if (cfg.exposure_us != -1)
{
cfg.exposure = 16*((int64_t)cfg.exposure_us * 1000) / sensor_mode->line_time_ns;
vcos_log_error("Setting exposure to %d from time %dus", cfg.exposure, cfg.exposure_us);
}
The documentation of the ov5647 does not clearly state so, but ov5648 does and when testing the ov5647 it was clear that the set exposure time was not correct.
I'm not sure how the other supported camera-modules work but I guess the configuration structs need some sort of new factor integer to enable a correct time-to-scanline conversion.
Any thoughts on this?
/Gustav