Grayscale JPEG Encoding

In Fig. 266 you can see the top level design of a process of the VisualApplets examples for grayscale JPEG encoding with the modules Implementation and Parameters. In this top level design you find also information on the number of processes in the design and on the design clock frequency used in the example implementation.

Top level design structure

Figure 266. Top level design structure

With right-mouse-click on the box Parameters you can set the applet parameters like image dimension, JPEG quality or pixel format. You can set these parameters dynamically during execution of the applet in hardware. In the module Implementation the JPEG compression is implemented. Please see Fig. 267 for the basic implementation structure.

Basic implementation of grayscale JPEG compression using operator JPEG_Encoder

Figure 267. Basic implementation of grayscale JPEG compression using operator JPEG_Encoder

An grayscale 8 bit image with maximum image dimensions of 5120x5120 pixels is forwarded from camera interface directly to operator JPEG_Encoder. In comparison to previous JPEG operator JPEG_Encoder_Gray no external 8x8 pixels block sorting module is necessary. With right-mouse-click on the operator you can set parameters like image width and height or you can include or exclude a JPEG header. The quality of the JPEG compression can be set using two options: You can set the quality of the compression in percent using parameter Quality or you can configure the quantization table values individually in setting the values of the matrix parameter LuminanceQuantization. As alternative you can modify these parameters in the top level design with right-mouse-click on module Parameters using the corresponding translate and reference operators (see Fig. 267). The compressed JPEG stream is then transmitted via DMA1_JPEG to PC. Via DMA0_Original the user has the possibility to transfer the original input image to PC. This can be realized in setting the parameter ImageOutput in the Properties library of module Parameters in the top level design (see above) to "Enable". A disabling of the transfer of the original image via DMA minimizes the DMA payload. In the design the user has the possibility to transmit images generated by a pattern generator instead of images acquired by a camera. This can be done in choosing the input source of Source Selector operator EnablePattern Generator or in setting the corresponding parameter TestImageGenerator in the module Parameters in the top level design.