Description

The Camera Image Decoding Model simulates the process by which electrical pulse signals are decoded back into RGB pixel data and reconstructed into image frames. This component models a real-world camera interface pipeline, including clock synchronization, signal quantization, and analog-to-digital conversion. It extends the Camera Image Coding Model Base and can be attached to a Camera or Computer component.


Example Use Cases

  • Image Reconstruction: Decode electrical signals received from a transmitter back into viewable image data.
  • Progressive Image Display: Visualize an image as it is being decoded, pixel by pixel, to simulate real-time data reception.
  • Signal Processing Validation: Test and validate different modulation schemes (PWM, PPM, AM, FM) for image data transmission.

Module Implementation

The decoding model processes electrical signal messages synchronized to an external clock and reconstructs image data by decoding each signal into RGB pixel components.

Signal Decoding

The decoder supports four modulation types, each mapping signal properties to pixel intensity values in the range .

Pulse Width Modulation (PWM)

Intensity is derived from the signal duty cycle :

where represents the normalized duty cycle.

Pulse Position Modulation (PPM)

Intensity is derived from the signal phase :

where is the phase angle in radians.

Amplitude Modulation (AM)

Intensity is derived from the normalized voltage-to-amplitude ratio:

where is the signal voltage and is the maximum amplitude.

Frequency Modulation (FM)

Intensity is derived from the normalized frequency within a configured range:

where is the signal frequency, is the minimum frequency, and is the maximum frequency.

Pixel Reconstruction

Each decoded intensity value corresponds to one RGB component. The component counter tracks whether the current value represents the red, green, or blue channel:

where is the total number of decoded components. A complete pixel is formed after every three decoded values.

Decoding Progress

The model tracks decoding progress as a ratio of decoded pixels to expected pixels:

where for an image of width and height .

Progressive Display

When enabled, the output image buffer is updated as each pixel is decoded, allowing visualization of the image being built in real-time. Pixels not yet decoded are filled with configurable default RGB values. The output message remains marked as invalid until decoding completes.

Signal Change Detection

The decoder monitors incoming signals for changes using a hash of signal properties (duty cycle, voltage, frequency, phase, and amplitude). Decoding begins when a new signal is detected and the decoder is at the start of a frame.


Assumptions/Limitations

  • The decoder assumes signals arrive in sequential order corresponding to pixel position (row-major format).
  • Each signal encodes exactly one RGB component; three signals are required per pixel.
  • Reset states (all signal properties set to zero) are ignored and do not trigger decoding.
  • The model requires a valid camera configuration message to determine image resolution.
  • Clock timing is inherited from the base coding model and assumes a stable clock frequency.