Dear Wong,
As per your guidance I have successfully installed libcamera c++ and getting image . But now I have an issue with grabbing image from camera, while I try to grab image from camera using
LibcameraOutData frameData;
bool flag=camera.readFrame(& frameData);//camera is libcamera variable
if(!flag)
{
return;
}
cv::Mat im(640,480,CV_8UC3, frameData.imageData);
Display_image(); // convert cv::Mat to Qimage and display in qpainter
Camera.returnFrameBuffer(frameData);
I only getting past buffer image .is there any option to set buffer size (or) any other options , please give some advice regarding this issue. Thank you in Advance
Dear yang,
by setting camera buffer while init camera as 0 int ret = cam.initCamera(width, height, formats::RGB888, 0, 0);
I am still getting past image from camera ,while click pushbutton for first 5 times it gives past image at 6th time it gives current image.is there any buffer need to clear in camera or system hardware.if its need to clear buffer in hardware please give an instruction to clear it . Thank you in Advance
Dear yang,
by setting camera buffer while init camera as 1 int ret = cam.initCamera(width, height, formats::RGB888, 1, 0);
I am still getting past image from camera ,while click pushbutton for first 2 times it gives past image at
3rd time it gives current image.at default it stores 2 past image as buffer .
In the sample code, when bufferCount is set to 0, the if branch cannot be entered, resulting in the inability to set bufferCount, and the default bufferCount is finally used. You can remove “if (bufferCount)” and have a try.
When bufferCount is set to 1. The previous two images are still in the past because they should be cached. Currently, clearing the buffer is not supported.