Description
The Camera Image Encoding Model simulates the process by which RGB pixel data from a digital camera sensor is encoded into electrical pulse signals. This component models a real-world camera interface pipeline, including clock synchronization, signal quantization, and digital-to-analog conversion. It extends the Camera Image Coding Model Base and can be attached to a Camera or Computer component.
Example Use Cases
- Image Transmission: Encode captured camera images into electrical signals for transmission over a communication link.
- Encoder-Decoder Pipelines: Link directly to one or more Camera Image Decoding Model components to simulate end-to-end image transfer.
- Modulation Testing: Evaluate different modulation schemes (PWM, PPM, AM, FM) for image data encoding.
Module Implementation
The encoding model processes RGB image data synchronized to an external clock and generates electrical signal messages representing each pixel component.
Signal Encoding
The encoder supports four modulation types, each mapping pixel intensity values in the range to signal properties.
Pulse Width Modulation (PWM)
The duty cycle is set proportional to the normalized intensity:
where is the pixel component intensity.
Pulse Position Modulation (PPM)
The signal phase is set proportional to the normalized intensity:
where radians.
Amplitude Modulation (AM)
The output voltage is set proportional to the normalized intensity:
where is the configured signal amplitude.
Frequency Modulation (FM)
The output frequency is mapped within a configured range:
where and are the minimum and maximum frequency bounds.
Pixel Processing
Each pixel is encoded as three sequential signal messages corresponding to the red, green, and blue components. The component index tracks which channel is currently being encoded:
where is the total number of encoded components.
Encoding Progress
The model tracks encoding progress as a ratio of encoded pixels to total pixels:
Decoder Linking
The encoder can be linked to one or more Camera Image Decoding Model components. When linked, encoded signal messages are automatically copied to the decoder’s input buffer, enabling direct encoder-to-decoder pipelines without requiring an intermediate transmission system.
Image Change Detection
The encoder monitors the input image for changes using a hash of key bytes in the image data. Encoding begins automatically when a new valid RGB image is detected.
Assumptions/Limitations
- Only RGB and FITS image types are supported; other image formats are ignored. FITS images are converted to RGB internally before encoding.
- The input image must be marked as valid to begin encoding.
- Each signal encodes exactly one RGB component; three signals are produced per pixel.
- Linked decoder buffers that are at capacity will not receive new messages until space is available.
- Clock timing is inherited from the base coding model and assumes a stable clock frequency.