Difference between revisions of "UVC"
Line 1: | Line 1: | ||
UVC stands for USB video class. |
UVC stands for USB video class. |
||
This class is typically used by USB cameras (webcams). |
This class is typically used by USB cameras (webcams). |
||
+ | UVC allows an embedded device to deliver video data to a host. Most host operating system (Linux, Windows, macOS) support UVC out of the box. |
||
+ | Video data can consists of data directly received from an image sensor (a camera), but can consists of pre-recorded video or even generated video. |
||
It supports compressed and uncompressed formats. |
It supports compressed and uncompressed formats. |
||
Line 8: | Line 10: | ||
* YUV422 - an uncompressed format in which 2 bytes per pixel are used |
* YUV422 - an uncompressed format in which 2 bytes per pixel are used |
||
* MJPEG |
* MJPEG |
||
+ | |||
+ | == Uncompressed video format - YUV422 == |
||
+ | YUV422 (sometimes called YUYV422) is the specific format used by the USB video device class. |
||
+ | The format uses luminance (the brightness) and chrominance (the coloration) to display |
||
+ | pictures. This is best explained by taking a look at the actual data, the first 8 bytes of a |
||
+ | YUV422 frame are defined as follows: |
||
+ | * 1 byte luminance of the first pixel |
||
+ | * 1 byte chrominance (blue) of the first and second pixel |
||
+ | * 1 byte luminance of the second pixel |
||
+ | * 1 byte chrominance (red) of the first and second pixel |
||
+ | * 1 byte luminance of the third pixel |
||
+ | * 1 byte chrominance (blue) of the third and fourth pixel |
||
+ | * 1 byte luminance of the fourth pixel |
||
+ | * 1 byte chrominance (red) of the third and fourth pixel |
||
+ | Using 1 byte for the chrominance of two pixels allows this format to save a byte per pixel |
||
+ | when compared to the common RGB format. |
||
= References = |
= References = |
Revision as of 08:42, 27 June 2019
UVC stands for USB video class. This class is typically used by USB cameras (webcams). UVC allows an embedded device to deliver video data to a host. Most host operating system (Linux, Windows, macOS) support UVC out of the box. Video data can consists of data directly received from an image sensor (a camera), but can consists of pre-recorded video or even generated video. It supports compressed and uncompressed formats.
Supported formats
- YUV422 - an uncompressed format in which 2 bytes per pixel are used
- MJPEG
Uncompressed video format - YUV422
YUV422 (sometimes called YUYV422) is the specific format used by the USB video device class. The format uses luminance (the brightness) and chrominance (the coloration) to display pictures. This is best explained by taking a look at the actual data, the first 8 bytes of a YUV422 frame are defined as follows:
- 1 byte luminance of the first pixel
- 1 byte chrominance (blue) of the first and second pixel
- 1 byte luminance of the second pixel
- 1 byte chrominance (red) of the first and second pixel
- 1 byte luminance of the third pixel
- 1 byte chrominance (blue) of the third and fourth pixel
- 1 byte luminance of the fourth pixel
- 1 byte chrominance (red) of the third and fourth pixel
Using 1 byte for the chrominance of two pixels allows this format to save a byte per pixel when compared to the common RGB format.
References
- SEGGER's UVC implementation on emUSB-Device https://www.segger.com/products/connectivity/emusb-device/add-ons/usb-video/