Capture Image with External Lighting #1043
-
I have limited resources, thus I am doing something not a very good practice, but still find it weird. I am using API to control a microcontroller to turn on external lighting. I wait 50ms before request a frame from camera. Sample code as below.
FYI, i am using HQ camera. Everything ok when I using resolution (2028, 1520), the effect is good. But when I use full resolution (4056, 3040), the image turn out part of it is dark. I think it should have same effect as (2028, 1520) resolution as both mode is using full sensor pixel with same crop limit. Is ti because of exposure? But I have already turn off auto exposure and set a fixed exposure value. Below are the sample image. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Ahhh I think i got the idea already. Seems like I got the frame when the lighting is not fully open. Under full resolution, HQ camera should able to run in 5fps, which means around 200ms per frame. Based on documentation, i should get one new frame upon requests instead getting and old frame. |
Beta Was this translation helpful? Give feedback.
-
In general, the camera system is quite heavily pipelined, so the time you receive a frame doesn't tell you much about when it was captured. There is actually a But even that isn't good enough, because the image will start to be exposured well before the first pixel is read out. The Picamera2
|
Beta Was this translation helpful? Give feedback.
In general, the camera system is quite heavily pipelined, so the time you receive a frame doesn't tell you much about when it was captured. There is actually a
"SensorTimestamp"
field in the image metadata that tells you when the first pixel of the frame was received.But even that isn't good enough, because the image will start to be exposured well before the first pixel is read out. The Picamera2
capture_request()
function actually has a feature to handle this. If you pass theflush
parameter asTrue
, then it will guarantee the no pixel is exposed before that moment. So your code would look something like