Is there a way to synchronize a led to the camera sensor exposure? For example, can I capture the trigger to indicate the beginning of a frame capture and start a GPIO (like gpio424, gpio393, gpio344) on the NVIDIA Jetson AGX Xavier GPIO Header Pinout? I want to achieve something like the following:
yes, we can classify it as a high frequency flash light synchronized with the beginning of frame capture. In the best scenario, we would like to be able to control the strobe light intensity (PWM) and on/off timing minimizing the volatility of the control communication to a few microseconds. If this is not possible we can use a list of ‘flash patterns’ and less frequent control updates. We already achieved this with Arduino as a led control board, we want to port this on Jetson AGX now.
would like to confirm you’re not using flash light to compensate the scene luminance for image capture.
you may look into Xavier’s VI driver, it’s vi5_fops.c
there’re two threads for frame captures, it’s a thread to enqueue sensor frame into capture buffer, another thread to dequeue for the user-space.
so, this is one frame become available that you may having implementation for your use-case.
for example,
static int tegra_channel_kthread_capture_dequeue(void *data)
{
while (1) {
...
buf = dequeue_dequeue_buffer(chan);
if (!buf)
break;
vi5_capture_dequeue(chan, buf);
}