K230 Integrated Demo: Single-Channel Smart IPC#
Overview#
This integrated demo combines network streaming, local rendering, and face detection into a single smart IPC application. With one camera connected, the system can:
Display the live image on HDMI or LCD and overlay face-detection results
Stream video over the network through RTSP
Choose whether the streamed picture is the raw camera frame or the composited frame with AI overlays
Usage#
Source path: /src/rtsmart/examples/integrated_poc/smart_ipc
Enable the build in make menuconfig:
RT-Smart UserSpace Examples ConfigurationEnable build integrated examplesSmart IPC examples
After a successful build, the executable is deployed to:
/sdcard/app/examples/integrated_poc/smart_ipc/smart_ipc.elf
Run on target:
/sdcard/app/examples/integrated_poc/smart_ipc/smart_ipc.elf [options]
Examples:
HDMI output:
./smart_ipc.elf -C 0
LCD output:
./smart_ipc.elf -C 1
Show help:
./smart_ipc.elf -H
Detailed options:
Option |
Description |
Default |
|---|---|---|
|
show help information |
- |
|
Sensor type, auto-detected by default |
|
|
Enable audio capture |
|
|
Audio sample rate |
|
|
Audio channel count |
|
|
Video codec type: |
|
|
Video encode width and height |
|
|
Bitrate in kbps |
|
|
Encode raw sensor output or VO WBC composited output |
|
|
Connector type: |
HDMI |
|
AI input width and height |
|
|
|
|
|
Face detection threshold and NMS threshold |
|
|
Enable rendering |
|
|
Enable AI analysis |
|
|
Enable encoded network streaming |
|
Code Structure#
Important files in the project include:
face_detection: face-detection modulemedia.cpp: media implementation; wraps MPI initialization and startup for camera, display, and codecsmedia.h: media interface declarationssmart_ipc.cpp: main application flowsmart_ipc.h:MySmartIPCclass and interfaces
MySmartIPC encapsulates all integrated smart-camera logic. In main, the app creates the object and calls init and start.
Inside MySmartIPC, wrapped MPI interfaces in KdMedia initialize VB buffers, camera/display, and codecs. The following callbacks are then used:
encoded video callback:
OnVEncDataencoded audio callback:
OnAEncDataAI input frame callback:
OnAIFrameData
MySmartIPC also uses KdRtspServer and FaceDetection for RTSP streaming and face detection. In OnAIFrameData, detection results are drawn on the VO OSD layer. In OnVEncData and OnAEncData, encoded streams are pushed to network clients.
Data Pipeline#
The pipeline uses three camera channels for local display, AI input, and encoded streaming:
camera input captures real-time video and splits it into three paths
one path is displayed through HDMI/LCD
one path is sent to AI for face detection and overlay
one path is encoded and streamed:
raw sensor frame path: encode directly from sensor channel (no AI overlays)
composited frame path: get VO WBC-composited frame with AI overlays, then encode and stream
This pipeline supports local display, AI analysis, and network streaming simultaneously.

Demo Walkthrough#
To view the live stream from a PC, make sure the board has a valid network IP.
run
ifconfigon the board to confirm IP addressrun
ping <PC_IP>on the board to verify connectivity
For HDMI output, connect HDMI to a monitor. For LCD output, connect an LCD panel.
cd /sdcard/app/examples/integrated_poc/smart_ipc
./smart_ipc.elf -C 0 -D 0 # HDMI output, RTSP streams raw frame
./smart_ipc.elf -C 1 -D 1 # LCD output, RTSP streams composited AI-overlay frame
The serial log shows a prompt like: Play this stream using the URL rtsp://<IP>:8554/test.
Open this URL in VLC on your PC to view the stream.

