gpt4 book ai didi

Image captured from OpenCV pi camera is full black(从OpenCV圆周率相机捕获的图像是全黑的)

转载 作者:bug小助手 更新时间:2023-10-25 12:25:20 25 4
gpt4 key购买 nike



The image that I captured was fully black. Using raspberrypi camera. (not a USB camera)

我捕捉到的图像是全黑的。使用raspberinki相机。(不是USB摄像头)


#include <opencv2/opencv.hpp>

int main()
{
cv::VideoCapture cam(0);

cv::Mat frame;

cam.grab();
cam.retrieve(frame);

cv::imwrite("test.jpg",frame);
}

Tried creating a loop of cam.grab() thinking that the error might have been too minimal exposure.
Still got a fully black image of 640x480.

我尝试创建一个cam.Grab()循环,认为错误可能暴露得太少。仍然得到了640x480的全黑图像。


I don't think this warning applies to what I am trying to do, but here it is

我不认为这个警告适用于我正在尝试做的事情,但它是这样的


[ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (501) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created

I have tested my camera using libcamera-jpeg and it works perfectly.

我已经用libCamera-jpeg测试了我的相机,它工作得很好。


更多回答
优秀答案推荐
更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com