Jump to content
  • 0

OpenCV and Pcam5-c


Esti.A

Question

Hi everyone,

I am working in teh demo that was created by Digilent to get images from teh Pcam5-c that is connected by a MIPI CSI-2 interface to teh zybo z7-020 board. In this case, I was wondering if I decide to do the processing of the image (edge detection, enhancement of light,...) I would need to use SDx. I have seen that there are plenty of solutions in OpenCv but I dont know how the hardware proyect and the SDx project can be linked. Note, in this initial design I have teh initiallization od teh camara and platform in a C++ application file that I dont know how if I should export to sdx file and how does this interact with the platform.

Anothr queation I have is that for interacting with the openCv set-up do I must use Linux ?

Kind regards

Esti

 

Link to comment
Share on other sites

Recommended Posts

The thing is that I obtained to get images finally, but again when uploading the same project something has changes because I am not able to get any image. I have found that the v4l2-ctl --all comand is defining planes now, (something that it dint do before)... what did you change to get at least an image?

 

Kind regards

 

Esti

 

 

image.png

Link to comment
Share on other sites

Hi @Esti.A,

Until now, I conclude that the system works very slow. I obtained filtered images with a very low frame rate (aprox. 1 frame / 7 sec. ). Still I don't know which is the component that generates the bottleneck. I am trying to modify the project and to simplify it's structure to solve this issue. I will post here any updates that I have.

Link to comment
Share on other sites

Hi @bogdan.deac,

 

1. Yes, I did follow the steps defined in the link

2. I didn't get any error while the project creation but I get the following when running the .elf file after mounting the mmcblk0p1

image.thumb.png.74ff7d0c51ab78c0cb549afd98df28ba.png

all the video initializing is performed correctly:

image.thumb.png.702002f692381a4fed82099455146c67.png

 

And I also checked the raw test creation :

image.thumb.png.4168937c52b405309c0e19e98c9659df.png

And if I try to run again the app (Demo.elf) it starts running but I get the following message:

image.thumb.png.eb52366501f36257ae21415dfa5a863f.png

 

 

 

 

 

 

image.png

Link to comment
Share on other sites

@bogdan.deac

I think the error comes from teh ncurse integration on teh proyect, as this inclusion is not solved and dependes on teh frame rate that is going to be displayed. Although that, could you send me teh files to introduce in teh sd_card you are using just to verify why I am not able to see anything in the display?

 

Kind regards

 

Esti

Link to comment
Share on other sites

@bogdan.deac,

I suspect that is something of the mounting of the sd card (     mount /dev/mmcblk0p1 /mnt/) because I have directly booted using the files you sent me and I get the same messages I posted previously.  OR the camera? Could it be possible?

And no, I am not able to get the image from the camera displayed in the monitor using HDMI.

 

Kind regards

 

Esti

 

 

Link to comment
Share on other sites

The thing is that actually I am not able to watch any image in the monitor, and the port tty1 is still opened. I have tried to check the drivers but no image is displayed, and when initializing the stream it gets blocked in the process.

image.thumb.png.9c009274c3b0a363e2df6ea631e89e0b.png

Link to comment
Share on other sites

Hi @bogdan.deac,

I followed your instructions but I found a error message while booting from the sd card the reVision platform that says the following:

 


U-Boot 2017.01 (Aug 05 2018 - 22:17:14 -0700)

Model: Zynq Zybo Z7 Development Board
Board: Xilinx Zynq
I2C:   ready
DRAM:  ECC disabled 1 GiB
MMC:   sdhci@e0100000: 0 (SD)
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ZYNQ GEM: e000b000, phyaddr 1, interface rgmii-id
SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB

Warning: ethernet@e000b000 using MAC address from ROM
eth0: ethernet@e000b000
U-BOOT for Zybo Z7
ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Hit any key to stop autoboot:  0
Device: sdhci@e0100000
Manufacturer ID: 1d
OEM: 4144
Name: SD    
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 58.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
3910868 bytes read in 340 ms (11 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@2' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel@0' kernel subimage
     Description:  Linux Kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000d4
     Data Size:    3878632 Bytes = 3.7 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   4b23816e227252b7549419997f26b3edbd525a7e
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@2' configuration
   Trying 'fdt@0' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x103b30b0
     Data Size:    30941 Bytes = 30.2 KiB
     Architecture: ARM
     Hash algo:    sha1
     Hash value:   6bda90ed3c9361add0bd7bb38aeb560c25288661
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x103b30b0
   Loading Kernel Image ... OK
   Loading Device Tree to 07ff5000, end 07fff8dc ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.9.0-xilinx-v2017.4 (digilent@ubuntu) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11)) #1 SMP PREEMPT Mon Jul 9 19:13:02 PDT 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Zynq Zybo Z7 Development Board
bootconsole [earlycon0] enabled
OF: graph: no port node found in /amba_pl/xilinx_drm
EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
INIT: version 2.88 booting
Starting udev
udev: Not using udev cache because of changes detected in the following files:
udev:     /proc/version /proc/cmdline /proc/devices
udev:     lib/udev/rules.d/* etc/udev/rules.d/*
udev: The udev cache will be regenerated. To identify the detected changes,
udev: compare the cached sysconf at   /etc/udev/cache.data
udev: against the current sysconf at  /dev/shm/udev.cache
Populating dev cache
ALSA: Restoring mixer settings...
No state is present for card ZyboZ7SoundCard
Found hardware: "Zybo-Z7-Sound-C" "" "" "" ""
Hardware is initialized using a generic method
/usr/share/alsa/init/default:26: value write error: Input/output error
/usr/share/alsa/init/default:26: value write error: Input/output error
/usr/share/alsa/init/default:263: value write error: Input/output error
/usr/share/alsa/init/default:263: value write error: Input/output error
/usr/share/alsa/init/default:265: value write error: Input/output error

No state is present for card ZyboZ7SoundCard
hwclock: can't open '/dev/misc/rtc': No such file or directory
Tue Jul 10 02:14:48 UTC 2018
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting internet superserver: inetd.
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc (v1.24.1) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Starting system message bus: dbus.
Starting Dropbear SSH server: dropbear.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done
Starting tcf-agent: OK

 

as you can see it is not finding this device and I dont know if this causes not to display any image in the hdmi. I am using filter2d demo, as is suggested for PCAM-5c set-up.

 

Link to comment
Share on other sites

Hi @Esti.A,

If you clone the repo you obtain the "source code" for the platform and you have to generate the platform by yourself. This is a time consuming and complicated task and is not recommended if you do not understand SDSoC very well.

I advise you to download the last SDSoC platform release from here. You will obtain a zip file that contains the SDSoC platform already build. After that, you can follow these steps to create your first project.

Link to comment
Share on other sites

Thank you for your great answer @bogdan.deac . I previously have tried with this project but I get the same problem as with Vivado 2018.2 which is that I am not able to write teh dsa file because its not able to get the properties of the design.

So I dont know what is not working in there but I get the same result for both projects. This one, has been directly ran and loaded without any changes on it.

1265011604_Screenshotfrom2019-04-1718-21-21.thumb.png.1e9d6fecf590beb80af93c971a4f2feb.png

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...