Jump to content

SIPL Frame Saver Example

From RidgeRun Developer Wiki

🚧 Documentation is under development

The Holoscan SDK guide is currently under active development. Some sections may be incomplete or change without notice.

Questions? Contact RidgeRun or email to support@ridgerun.com.

Contents Pin





SIPL Frame Saver Example

Capture frames from one SIPL camera and save the raw bytes, image descriptors, and sensor metadata for offline inspection. The example is useful when the first goal is to confirm capture and understand the delivered format before adding image processing.

The SIPLCaptureOp page explains the capture ports and metadata. This page follows those outputs into files and a decoder.


Prerequisites
Complete Holoscan Camera Build and Installation with the SIPL operator and this application enabled. Use a supported SIPL platform, camera rig, platform configuration, driver set, and tuning files.


What you will learn

  • How one captured frame becomes a raw file and two text sidecars.
  • How RAW10 and NV12 choices affect the saved bytes.
  • How to inspect a saved frame without keeping the camera running.
  • Which checks are still required before treating a recording as complete.

Build and run

Use the shared Holoscan Camera build page for configuration and installation. Then run the application from the camera checkout on the target:

./holoscan_camera run sipl_frame_saver --language cpp \
    --run-args '--camera-config VB1940 --json-config /workspace/holoscan_camera/applications/config/sipl/vb1940_single.json --camera-index 0 --frames 5 --output-dir /workspace/holoscan_camera/data/sipl_frames'

The explicit workspace output directory keeps the files available after the launcher exits. Use the JSON file and camera index that match the connected rig.

Follow the workflow

Operators used

Operator Role in this example
SIPLCaptureOp Captures image frames and correlated sensor metadata from the SIPL camera.
FrameSaverOp Writes captured image bytes and image metadata to the frame files.
SensorDataSaverOp Writes selected sensor measurements and validity flags to the sensor sidecar.

The capture graph sends image data to a file sink and sensor metadata to a second sink. The saved artifacts are:

Artifact Contains
frame_<sequence>.raw The emitted RAW10 or NV12 bytes.
frame_<sequence>.txt Dimensions, encoding, byte count, pitch, and selected image metadata.
frame_<sequence>_sensor.txt Selected sensor measurements and validity flags.

The two sinks count independently. A matching count does not prove that every sequence has a complete raw file and sidecar, so inspect the actual filenames, sizes, and sequence identifiers.

Expected result

The application stops after the requested frame count or when its timeout expires. A zero return code means the completion condition was reached. It does not independently validate every final write or prove that every image and sensor sidecar belongs to the same sequence.

Check the output directory before using the data. For a short inspection environment, install the decoder dependencies and inspect one saved basename:

python3 -m venv .venv-sipl-preview
.venv-sipl-preview/bin/python -m pip install numpy opencv-python
.venv-sipl-preview/bin/python tools/decode_sipl_frame.py \
    data/sipl_frames/frame_00000001 --info
.venv-sipl-preview/bin/python tools/decode_sipl_frame.py \
    data/sipl_frames/frame_00000001 --out data/sipl_frames/frame_00000001.png


Related examples and concepts

Examples

Concepts

Source The complete application is in the SIPL Frame Saver example. The application source contains the graph and file sinks. The decoder handles saved frame inspection.

Official documentation

NVIDIA Holoscan SDK official documentation provides the current camera and application reference.


Cookies help us deliver our services. By using our services, you agree to our use of cookies.