Zybo Z7-20 Pcam 5C Demo
Overview
Description
The Zybo Z7 Pcam 5C project demonstrates the usage of the Pcam 5C as a video source by forwarding the streaming image data out to the HDMI TX port. The behavior is as follows:
-
Video data streams in through the Pcam port and out through the HDMI source (TX) port.
-
A UART interface is available to configure the image sensor and additional post processing IP Cores.
The following table lists the currently supported video resolutions and output formats from the image sensor. Note that resolutions with frame rates lower than 60Hz are over sampled to 60Hz to output over the HDMI port.
Supported Resolutions: | Supported Image Sensor Output Formats | Supported OV5640 Image Processing Features | Image Processing Features Performed in FPGA |
---|---|---|---|
*[email protected] *[email protected] |
* RAW | * Auto White Balance * Defective Pixel Canceling * Auto Exposure Control (AEC) * Auto 50/60Hz Luminance Detection |
* Demosaicing * Gamma Correction |
Features Used
Not Used | Used | |
---|---|---|
4 slide switches | X | |
5 LEDs | X | |
2 RGB LEDs (1*) | X | |
6 push buttons | X | |
USB-UART Bridge | X | |
Micro SD card connector | X | |
HDMI Sink | X | |
HDMI Source | X | |
Pcam camera connector | X | |
Audio codec w/ three 3.5mm jacks | X | |
UserEEPROM | X | |
10/100/1000 Ethernet PHY | X | |
1GB 1066MHz DDR3 Memory | X | |
Serial Flash | X | |
6 Pmod ports (5*) | X | |
Pmod for differential analog signals | X | |
USB HID Host | X |
Prerequisites
Skills
-
Basic familiarity with Vivado & SDK
-
This experience can be found by walking through our “Getting Started with Vivado” guide
-
Hardware
-
Zybo Z7-20 board
-
Micro-USB cable
-
1 HDMI Type A to Type A or HDMI Type A to DVI-D cable
-
1 Pcam 5C assembly
-
HDMI or DVI monitor
Software
-
Vivado Design Suite & Xilinx SDK 2016.4
-
Version 2016.4 must be used to generate the project
-
Downloads
Download and Launch the Zybo Z7 Pcam 5C Demo
Follow theUsing Digilent Github Demo ProjectsTutorial. Since this is a Vivado SDK Project, you can either directly launch SDK and import the hardware handoff, or you can generate a bitstream in Vivado before launching SDK. Select the hardware handoff options in the tutorial if you don't want to modify the project block design later. Return to this guide when prompted to check for additional hardware requirements and setup.
Attach the Pcam 5C assembly (which includes the Pcam 5C and the attached 15-pin flat flexible cable) by inserting the other end of the FFC into the Pcam connector on the Zybo Z7 as shown in image below. Ensure the cable is securely latched by pressing down firmly on the connector with two fingers. For a more detailed set of instructions, see the Pcam section in theZybo Z7 Reference Manual. If the cable has become disconnected from the Pcam 5C, please see thePcam 5C reference manualfor instructions on how to reattach it.
Using the Zybo Z7 Pcam 5C Demo
Pcam 5C Image Sensor and Post Processing Options
a - Change Resolution
This option can be used to change the resolution of the video coming from the sensor. Currently[email protected]is not supported and will cause problems if used.
b - Change Liquid Lens Focus
This option is not compatible with this version of the Pcam 5C and should be ignored
d - Change Image Format
This option was included for debugging purposes and should always be set to RAW mode (option 2)
e - Write a Register inside the Image Sensor
This option allows you to write a value to any register inside the Image sensor over the OmniVision SCCB interface. You will need to refer to the OV5640 datasheet for information on the register map. This option is very useful for exploring the features of the image sensor.
f - Read a Register inside the Image Sensor
这个选项允许您阅读value of any register inside the Image sensor over the OmniVision SCCB interface.
g - Change Gamma Correction Factor Value
This option allows you to change the amount of gamma correction that is done by the custom AXI stream IP inside the FPGA.
h - Change AWB Settings
This option allows you to adjust how the image sensor is doing auto white balancing. There are 3 modes: Advanced, simple, and disabled. The advanced mode sometimes causes dramatic shifts between “red-ish” and “blue-ish” tints.
Pcam 5C Image Quality Notes
This demo uses our own software to configure the OV5640 image sensor and open source IP to post process the image data. Both of these facets of the software greatly affect image quality. This section documents the current quality of the images our software is able to produce with the Pcam 5C. We are aware that the quality of the image affects whether the Pcam 5C is suitable for some applications, so the information provided here can be used to help determine if the product will fit your needs.
我们希望提高连续图像的质量ced by this demo over time, so please check back often if you are interested. We are also looking into using Xilinx IP and the Omnivision provided Linux drivers to provide another software option for the use of the Pcam 5C. This will be made available if successful on thePcam 5C Resource Center.
Color Accuracy
We have seen some issues with the accuracy of the colors produced in some conditions. The affect is that colors seem less vivid and washed out. In some cases the image tends to look a little skewed towards “yellow-ish”. When the gamma adjustment is set higher, this affect becomes more noticeable. The images below compare the image produced with the Pcam 5C to images produced by a high-quality USB web camera. The camera used was a Logitech C920. The USB camera is on the right and the Pcam 5C image is on the left.
No gamma correction, Pcam on Left
With gamma correction, Pcam on Left
Over Exposure
Visible Border Line
The top and left edges of the image have a single pixel gray line. This artifact is introduced by our post processing IP, axis_raw_demosaic. It is an accepted side-effect of the border interpolation algorithm used and we plan to provide other options in future versions of the IP. The image below is taken with the Pcam 5C lens cap on, which makes the gray line very visible on the all black image.
Gray border on the top and left sides