Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Example code of demonstrating image from a Cypress UVC device

Example code of demonstrating image from a Cypress UVC device

YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Source Code: https://github.com/zhao1mh/webcamtest

This is a simple example webcam test program using SDL2. It only supports YUY2 format. The UVC device should have VID:0x04b4&PID:0x00f9. Frames per second are calculated with a timer. 

It shows that USB transfer will not use too many system resources. Actually, the real reason for the low FPS is the efficiency of the Video Player.

Tested Platform: RaspberryPi 400 & Ubuntu

Author: Eddie Zhao

Version : 1.02

Date: 8/12/2021Cancel changes

Build:

sudo apt-get install libusb-1.0-0-dev libsdl2-dev

git clone http://github.com/zhao1mh/webcamtest.git
cd webcamtest
./configure
make

417 Views
Contributors