Documentation

JPEG Compression

JPEG Compression block

Library

Simulink® Real-Time™ Library for Video Utilities

Description

The JPEG Compression block compresses the video frame received by the target computer.

Block Inputs and Outputs

Inputs

NameDescription

Image

Video frame to compress

Outputs

NameDescription

Data

Vector of byte containing video data compressed by block.

Length

Number of bytes of compressed data.

Visible when the Show output image length check box is set.

Block Parameters

Compression quality (-1:default)

Enter a value between 0 and 100 to specify how much to compress the incoming video frame. The lower the value, the less the compression quality.

Enter -1 to use the default compression quality for the video frame.

Input colorspace

One of the following:

  • Grayscale

    Compress the video frame using a grayscale color space scheme.

  • YCbCr 4;4:4

    Compress the video frame using the YCbCr color space scheme.

  • RGB

    Compress the video frame using the red, blue, green (RGB) color space scheme.

Image signal
  • One multidimensional signal

    One signal where each dimension contains color information. Selecting this option creates one port, Image.

  • Separate color signals

    Multiple color signals where each signal contains the information for one color. Selecting this option creates the following ports, depending upon the colorspace.

    • Grayscale: port Image

    • RGB: ports R, G, B

    • YCbCr: ports Y, Cb, Cr

Max output image size (bytes)

Enter the maximum output size for the compressed video frame, in bytes. Use format height * width.

Show output image length

Select this check box to output the video frame length. Selecting this check box displays the Length port.

Was this topic helpful?