Giter VIP home page Giter VIP logo

qengineering / bananapi-m2-zero-ov5640 Goto Github PK

View Code? Open in Web Editor NEW
35.0 5.0 5.0 58 KB

Banana Pi M2 zero with OV5640, WiringPi and OpenCV image.

Home Page: https://qengineering.eu/deep-learning-with-raspberry-pi-and-alternatives.html

License: BSD 3-Clause "New" or "Revised" License

banana-pi banana-pi-m2 banana-pi-m2-zero ov5640 opencv sd-card sd-card-image gstreamer cpp armbian wifi bluetooth ssh allwinner h2-plus wiringpi

bananapi-m2-zero-ov5640's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bananapi-m2-zero-ov5640's Issues

Video problem

hello,
We have been trying to initialize your module in 1080p and 720p but its failing , either for lack of ram or incorrect frame size, please help us with the correct settings when we are opening a video in opencv. i would like to record 1080p video on it , failing that atleast 720p
but only video we could record was at 640x480 , please also suggest the libraries that we need to install to make this happen

only for test.

this repository is for testing purposes only. the camera is working or not working. How to install the camera is not written. dts not working.

camera not enabled

Hello

I got a bananaPI M2 Zero and got the recommended camera module.
Trying to follow this manual, downloaded the image, it is working.

when trying to init the camera i get this:
pi@banana:$ sudo media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/1280x720]'
Failed to enumerate /dev/media1 (-2)
pi@banana:
$ sudo media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/640x480]'
Failed to enumerate /dev/media1 (-2)
pi@banana:~$

I activated all io of the board (i2c etc') no help.

From DMESG:
pi@banana:$ dmesg | grep capture -a3 -n5
109-[ 1.192517] libata version 3.00 loaded.
110-[ 1.192815] usbcore: registered new interface driver usbfs
111-[ 1.192863] usbcore: registered new interface driver hub
112-[ 1.192910] usbcore: registered new device driver usb
113-[ 1.193053] mc: Linux media interface: v0.10
114:[ 1.193087] videodev: Linux video capture interface: v2.00
115-[ 1.193217] pps_core: LinuxPPS API ver. 1 registered
116-[ 1.193225] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
117-[ 1.193245] PTP clock support registered
118-[ 1.193965] Advanced Linux Sound Architecture Driver Initialized.
119-[ 1.194992] NetLabel: Initializing
pi@banana:
$

so, would like help in getting it to work.

Thank you.
bpi2mz

Guy

Banana Pi M2 Zero

boots into login screen, but keyboard and mouse are not recognized (work in ubuntu)
cursor stops blinking after a few seconds...

Can't work in chenged resolution

Default status

Device topology

  • entity 1: sun6i-csi (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video1
    pad0: Sink
    <- "ov5640 2-003c":0 [ENABLED]

  • entity 5: ov5640 2-003c (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev0
    pad0: Source
    [fmt:UYVY8_2X8/640x480@1/30 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
    -> "sun6i-csi":0 [ENABLED]

** work well --> CamLive.py with 640*480
** work well --> gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw, width=640, height=480, framerate=30/1 ! videoconvert ! autovideosink

I changed set with

sudo media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/1280x720@1/15]'

** do not work --> CamLive.py
** work well --> gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw, width=1280, height=720, framerate=15/1 ! videoconvert ! autovideosink

how can I change resolution without error in CamLive.py ?

Instructions for build for Generic Armbian Image

Hello @Qengineering

Thank you for great work to provide image with open cv +ov 5640. Job that u did is really fundamental. But if it is possible I want to get instructions to get working ov5640 and opencv from fresh image. your image based of full system(+ desktop) and I would like to have some lightweight solution based on server image of (armbian/ubuntu/debian whatever is suitable for that).

I see that this board really wild , there a lack of info in the internet how to get things right.

I found A good article of your site how to compile opencv and it is really good guide. but csi camera makes me struggling for a week.
Best regards

V4l2 device not initializing

First of all I initialized media device to be as v4l2 device with the following command:

sudo media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/640x480]'

Command succeed, media-ctl has the following output

pi@banana:~$ media-ctl -p -d /dev/media1
Media controller API version 5.10.43

Media device information
------------------------
driver          sun6i-csi
model           Allwinner Video Capture Device
serial          
bus info        platform:1cb0000.camera
hw revision     0x0
driver version  5.10.43

Device topology
- entity 1: sun6i-csi (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video1
	pad0: Sink
		<- "ov5640 2-003c":0 [ENABLED]

- entity 5: ov5640 2-003c (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev0
	pad0: Source
		[fmt:YUYV8_2X8/640x480@1/30 colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
		-> "sun6i-csi":0 [ENABLED]

/dev/video1 also is been created, but unfortunately I can't see device with v4l2-ctl

Due to dmesg I have the register error:

pi@banana:~$ dmesg | grep ov5640
[    7.473763] sun6i-csi 1cb0000.camera: creating ov5640 2-003c:0 -> sun6i-csi:0 link
[    8.069158] ov5640 2-003c: ov5640_read_reg: error: reg=300a
[    8.069175] ov5640 2-003c: ov5640_set_power_on: failed to read chip identifier

Camera seems to be strangely initialized on the bus, without 100% correct address 0x3c

pi@banana:~$ sudo i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --       

Finally:

  • what should I try to get image from camera?
  • if I make aptitude update with upgrade the csi device gets out from the bus

Mediapipe

Does the mediapipe library work on m2 zero?

congrats on an image but camera is not working

pi@banana:~$ media-ctl -p -d /dev/media1
Media controller API version 5.10.43

Media device information
driver sun6i-csi
model Allwinner Video Capture Device
serial
bus info platform:1cb0000.camera
hw revision 0x0
driver version 5.10.43

Device topology

  • entity 1: sun6i-csi (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video1
    pad0: Sink
    <- "ov5640 2-003c":0 [ENABLED]

  • entity 5: ov5640 2-003c (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev0
    pad0: Source
    [fmt:YUYV8_2X8/640x480@1/30 colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
    -> "sun6i-csi":0 [ENABLED]

pi@banana:~$ lsmod
Module Size Used by
rfcomm 53248 16
cmac 16384 1
bnep 24576 2
snd_soc_hdmi_codec 20480 1
hci_uart 61440 0
lima 45056 0
brcmfmac 176128 0
btrtl 20480 1 hci_uart
dw_hdmi_i2s_audio 16384 0
sun6i_csi 32768 0
dw_hdmi_cec 16384 0
btbcm 16384 1 hci_uart
brcmutil 16384 1 brcmfmac
input_leds 16384 0
gpu_sched 28672 1 lima
bluetooth 413696 40 btrtl,hci_uart,bnep,btbcm,rfcomm
ov5640 28672 1
ecdh_generic 16384 2 bluetooth
ecc 28672 1 ecdh_generic
cfg80211 491520 1 brcmfmac
v4l2_fwnode 24576 2 ov5640,sun6i_csi
sun4i_gpadc_iio 16384 0
industrialio 53248 1 sun4i_gpadc_iio
sun8i_thermal 16384 0
rfkill 20480 7 bluetooth,cfg80211
sunxi_cedrus 32768 0
v4l2_mem2mem 20480 1 sunxi_cedrus
videobuf2_dma_contig 20480 2 sunxi_cedrus,sun6i_csi
videobuf2_memops 20480 1 videobuf2_dma_contig
videobuf2_v4l2 20480 3 sunxi_cedrus,sun6i_csi,v4l2_mem2mem
zram 24576 2
videobuf2_common 40960 4 sunxi_cedrus,sun6i_csi,v4l2_mem2mem,videobuf2_v4l2
evdev 20480 6
uio_pdrv_genirq 20480 0
display_connector 20480 0
uio 16384 1 uio_pdrv_genirq
cpufreq_dt 20480 0
usb_f_acm 20480 1
u_serial 24576 3 usb_f_acm
g_serial 16384 0
libcomposite 45056 2 g_serial,usb_f_acm
ip_tables 24576 0
x_tables 24576 1 ip_tables
autofs4 36864 2
pwrseq_simple 16384 1
sunxi 16384 0
phy_generic 20480 2 sunxi
gpio_keys 20480 0

i don't know is this all good....

but when it comes to actual using of camera - it says something about "pipeline error, can not open pipeline..." (i can paste it here tomorrow)

i tried python app, from code-block, even downloaded gvcuview app, and vlc. Zero success :-\ and i lost like 6h today on that...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.