Description

The Camera Image Coding Model Base is an abstract class that provides common functionality for encoding and decoding RGB pixel data to and from electrical signals. It serves as the foundation for specific image coding implementations used in camera payload models, handling clock synchronization, pixel format conversion, and signal timing.


Module Implementation

Clock Timing

The coding model synchronizes pixel data transmission with an external clock signal. The clock period is derived from the input clock frequency:

where is the clock signal frequency in Hz. If no valid clock signal is available, a default clock period is used.

Clock Edge Calculation

To determine how many pixels to process in a given simulation step, the model calculates the number of clock edges that occur within the time step . This accounts for fractional periods from previous steps:

where is the period remainder from the previous update cycle. The remainder is updated each step to maintain timing accuracy:

Intensity Conversion

Pixel intensity values are converted between 8-bit integer representation and normalized floating-point values. For encoding:

For decoding back to 8-bit:

where and .

Grayscale Conversion

RGB pixel data can be converted to grayscale using the standard luminance formula:

where , , and are the red, green, and blue components respectively. This weighting reflects human perception of color brightness.

Pixel Data Format

The model supports both monochromatic and color image formats:

  • Monochromatic: One byte per pixel representing grayscale intensity
  • Color: Three bytes per pixel in RGB order, stored in row-major format

Assumptions/Limitations

  • The model assumes a square-wave clock signal with instantaneous edges.
  • Pixel data is processed sequentially; parallel pixel processing is not supported.
  • The luminance formula uses fixed ITU-R BT.601 coefficients and does not account for gamma correction.
  • Clock period calculations assume a stable, non-varying frequency throughout the simulation step.