Hi everyone, I’m back with another little problem, at least this thime will bring lots of fun, I believe.
So, I’m using 2 Pi NoIR cameras and an IR light source I built myself (obviously I used IR leds and the circuit works perfectly). Under the IR source there is a white diffusing glass.
Unfortunately, the captured images are completely pink! I tried to set different parameters in the pipeline, but I wasn’t able to solve the problem.
This is the pipeline I’m currently using:
def gstreamer_pipeline(
sensor_id=0,
exposuretime_low = 20000000,
exposuretime_high = 20000000,
capture_width=1280,
capture_height=720,
display_width=600,
display_height=340,
framerate=30,
flip_method=0,
):
return (
"nvarguscamerasrc sensor-id=%d sensor-mode=2 wbmode=1 awblock=false exposuretimerange=\"%d %d\" aelock=false gainrange=\"1 1\" saturation=1 ! "
"video/x-raw(memory:NVMM), width=(int)%d, height=(int)%d, format=(string)NV12, framerate=(fraction)%d/1 ! "
"nvvidconv flip-method=%d ! "
"video/x-raw, width=(int)%d, height=(int)%d, format=(string)BGRx ! "
"videoconvert ! "
"video/x-raw, format=(string)BGR ! appsink"
% (
sensor_id,
exposuretime_low,
exposuretime_high,
capture_width,
capture_height,
framerate,
flip_method,
display_width,
display_height,
)
)
This is one of the two images:
The image is also cut in a strange way, I think this is related to the values of capture width/height
and display width/height, am I right?
I tried to work with the saturation parameter, setting it to 1, but even without it the images were still pink.
Maybe setting saturation=0
will do the job? This shoud also enable the black and white recording according to this gstreamer documentation.
How would you modify the pipeline? The image is definitely not right for my purpose, which is to see the hand vein pattern.