-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
does not work with opencv4 #5
Comments
Try with this headers:
Edit: You need namespace: using namespace std; cv::cvMat |
I build "cap". Does not work, does not save jpeg. My init setup. it works |
pi@bpim2z:~/src/cap-v4l2$ media-ctl --device /dev/media0 -p Media device informationdriver sun6i-csi Device topology
|
Try to lower FPS (try 30 or 15) here: https://github.com/avafinger/cap-v4l2/blob/master/cap.c#L296
|
the same! |
Did you try? Then comment the whole code: #if 0 |
:( |
If you want to grab a JPG image, the sensor (OV5640) is able to deliver it without any conversion (without OpenCV). PR applied. |
See also #7 Unfortunately, I get this error: ./cap 1920 1080 8 1 -999 -1 -1 The system I use is
Here is additional info https://pastebin.com/QbRAmxka and https://pastebin.com/PVeY1ef3 Just to be sure, I am using the correct kernel module for this camera? https://pine64.com/product/pine64-5-megapixel-camera-module/?v=0446c16e2e66 Has been a while that I had this working. The s5k4ec has nothing to do with this camera, correct? |
where is your camera ov5640? and add /etc/modules |
Okay, loaded it manually now. This looks good?
Also added it to /etc/modules and booting reports
Then still
To be sure, this is the correct driver for this camera? It used to work with different version of Ubuntu in the past. What are other ways to see what might be the problem? Is the the DTB file in Armbian supporting this? |
I dont See CSI . I must have 2 Video Dev. |
I don't have a CSI module
has no results. Also, all sun4 modules only are:
I have been looking into the build config. I think this file is used https://github.com/armbian/build/blob/main/config/kernel/linux-sunxi64-current.config#L4479 and has ov5640 as a module but nothing on CSI. Should it have a line like https://github.com/armbian/build/blob/main/config/kernel/linux-sunxi-current.config#L4274 with (Additionally, I found https://github.com/armbian/build/blob/main/patch/kernel/archive/sunxi-6.1/patches.armbian/arm-dts-overlay-Add-Overlays-for-sunxi.patch#L1205 but I don't think this interferes.) |
the camera without csi will not work. is there csi in your driver tree? I also use Armbian. I added my overlays. i use Banana Pi M2 Zero. |
Thanks. I'm building Armbian install image with CSI as module. Do you use SUN4I_CSI or SUN6I_CSI? Where/what are the overlays you are using? |
CONFIG_VIDEO_SUN6I_CSI=m and also check out how to use it: https://github.com/avafinger/bananapi-zero-ubuntu-base-minimal#working-with-cameras |
I have the kernel modules not in my build and I can load all of them. How can I check if the device tree overlay https://github.com/avafinger/OV5640_camera/blob/master/sun50i-a64-pine64-plus.dtb is already supported by the Armbian build? |
Ah, just found |
I have overlay for the Camera OV5640. Only 1 command armbian-add overlay ...... |
I did the following:
Any ideas how to fix this or make the next step? |
The error reported here: That means your camera only supports MPLANE. There is no support for MPLANE in cap-v4l2 Change that part of the code to check if true:
I think the same is also true for fswebcam. Maybe i will revisit fswebcam and add mplane support if you don't find any suitable version on the net, i can't promise it soon. |
cap.c: In function ‘int v4l2_display_pix_format(int)’:
cap.c:197:1: warning: no return statement in function returning non-void [-Wreturn-type]
197 | }
| ^
cap.c: In function ‘int v4l2_retrieve_frame(int, int, int, int)’:
cap.c:409:5: error: ‘IplImage’ was not declared in this scope
409 | IplImage frame_ipl;
| ^~~~~~~~
cap.c:409:15: error: ‘frame_ipl’ was not declared in this scope
409 | IplImage frame_ipl;
| ^~~~~~~~~
cap.c:410:5: error: ‘CvMat’ was not declared in this scope
410 | CvMat frame_bgr;
| ^~~~~
cap.c:462:27: error: invalid conversion from ‘void’ to ‘unsigned char’ [-fpermissive]
462 | frame_yuv = calloc(ALIGN_16B(width) * height * 3, sizeof(unsigned char));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void*
cap.c:464:9: error: ‘frame_bgr’ was not declared in this scope; did you mean ‘frame_yuv’?
464 | frame_bgr = cvMat(height, width, CV_8UC3, (void *) frame_yuv);
| ^~~~~~~~~
| frame_yuv
cap.c:464:21: error: ‘cvMat’ was not declared in this scope
464 | frame_bgr = cvMat(height, width, CV_8UC3, (void *) frame_yuv);
| ^~~~~
cap.c:466:9: error: ‘cvSaveImage’ was not declared in this scope
466 | cvSaveImage(frame_name, &frame_bgr, 0);
| ^~~~~~~~~~~
cap.c: In function ‘int v4l2_close_camera(int, int)’:
cap.c:491:1: warning: control reaches end of non-void function [-Wreturn-type]
491 | }
| ^
The text was updated successfully, but these errors were encountered: