Embedded OpenCV 4 Vision, USB Bluetooth, Voice/IoT & Video Surveillance Projects

For: Embedded Linux HMI, edge computer-vision, wireless connectivity, and connected-appliance C++20 engineers

Cross-compile OpenCV 4 for ARMv7-A Linux 6.12 and ship four end-to-end embedded Qt 6 / C++20 capstone systems: V4L2 camera vision & license-plate OCR, BlueZ RFCOMM wireless control, Smart-Home IoT + 16 kHz WAV speech HMI, and chunked UDP video surveillance.

18 lessons6 labs~15h 45mLinux 6.12Course 4 of 4 · OpenCV 4 Vision, Bluetooth, Voice/IoT & Surveillance Capstones

What you'll build

lab m0175 min

V4L2 Capture Node Filter, BT.601 YUYV-to-RGB888 & Stride-Safe QImage Bridge

Cross-compile headless OpenCV 4 with ARMv7-A NEON/VFPv4 SIMD and V4L2 capture backends into isolated staging sysroots, filter CSI and UVC V4L2_CAP_VIDEO_CAPTURE nodes away from the i.MX6ULL /dev/video0 PXP mem2mem engine while converting YUYV 4:2:2 frames to RGB888, and bridge cv::Mat strides and reference-counted lifetimes safely into QImage with worker-thread photo encoding.

learner@ksa: ~/gl-q04/lab-m01
learner@ksa:~/gl-q04/lab-m01./files/lab_cliV4L2 selected=1 first=/dev/video1 | YUYV p0_rgb=(255,190,190)OwnedQImage 319x2: bytesPerLine=960 row1_p0_rgb=(0x33,0x22,0x11)learner@ksa:~/gl-q04/lab-m01
lab m0275 min

BlueZ SDP Dynamic RFCOMM Allocator, Stream Framer & Deferred-Delete Hub

Bring up USB Bluetooth adapters through Linux btusb, hci0, and bluetoothd D-Bus into Qt6::Bluetooth, register 128-bit SDP service UUIDs over dynamically assigned RFCOMM channels via QBluetoothServer, and engineer multi-client UTF-8 framed QBluetoothSocket hubs with safe qobject_cast sender routing and deleteLater() disconnect lifetime safety.

learner@ksa: ~/gl-q04/lab-m02
learner@ksa:~/gl-q04/lab-m02./files/lab_cliSDP channel=3 resolved=3 | RFCOMM frames=2 [0]='CMD RELAY=ON' [1]='STAT?'Broadcast delivered=1 active_after_drop=1 deferred_swept=1learner@ksa:~/gl-q04/lab-m02
lab m0375 min

GPIO Pin-Contention Guard, +IPD/CRC16 IoT Framer & Shadow State Reconciler

Diagnose hardware GPIO pin contention between board LED/KEY lines and external UART-to-Wi-Fi (ESP8266 AT) IO0/RST bootstrap pins versus native Linux wlan0 sockets, parse cloud JSON device rosters via QJsonDocument with Bearer token authentication and idempotent command framing, and reconcile optimistic HMI switch intent against confirmed device shadow state, monotonic heartbeats, and bounded retry queues.

learner@ksa: ~/gl-q04/lab-m03
learner@ksa:~/gl-q04/lab-m03./files/lab_cliGPIO guard: shared_trap=-2 isolated_4wire=0 | +IPD bytes=14 ack_seq=1 switches=1Shadow HMI: pending=2 -> confirmed=3 (queue=0)learner@ksa:~/gl-q04/lab-m03
lab m0475 min

16 kHz RIFF/WAVE Header Back-Patcher, RMS/VAD Trimmer & OAuth2 ASR Verifier

Capture 16 kHz mono S16_LE PCM audio with back-patched 44-byte RIFF/WAVE headers, compute real-time RMS voice-activity levels and silence trimming, and integrate cached OAuth2 Base64/JSON speech-recognition REST intent routing on ARMv7-A Linux 6.12.

learner@ksa: ~/gl-q04/lab-m04
learner@ksa:~/gl-q04/lab-m04./files/lab_cliwav16k_header: valid=1 riff_sz=16036 data_sz=16000 byte_rate=32000vad_trim: peak_rms=0.1373 clipped=0 samples=[1280..8000)asr_pack: ok=1 raw_len=16044 b64_len=21392learner@ksa:~/gl-q04/lab-m04
lab m0575 min

Otsu Thresholding, Morphological Plate ROI Filter & URL-Encoded OCR Verifier

Localize vehicle license-plate regions on ARMv7-A Linux 6.12 using OpenCV luma conversion, Gaussian denoising, vertical Sobel gradients, Otsu thresholding, and morphological closing, then validate 25x-smaller cropped ROI OCR payloads.

learner@ksa: ~/gl-q04/lab-m05
learner@ksa:~/gl-q04/lab-m05./files/lab_cliotsu_threshold: t_star=14 candidates=1plate_candidate: rect=(22,26,32,10) aspect=3.20 fill=1.00clamped_roi: (0,30,35,14) | ocr_body=image=%2F9j%2F%2Buz%2F2Q%3D%3Dlearner@ksa:~/gl-q04/lab-m05
lab m0690 min

MTU-Safe (< 1400 B) UDP JPEG Chunker, CRC-16 Reassembler & Stale-Frame Evictor

Architect a low-latency multi-client video surveillance pipeline on single-core Cortex-A7 Linux 6.12 by decoupling V4L2 capture and JPEG compression onto a worker thread, chunking frames into MTU-safe (< 1400 B) CRC-16 UDP datagrams, and evicting stale incomplete frames.

learner@ksa: ~/gl-q04/lab-m06
learner@ksa:~/gl-q04/lab-m06./files/lab_clichunker: jpeg_bytes=24576 datagrams=19 max_pkt=1376 (<1400B)reassembler: complete=1 exact_match=1 dups=1 evicted=0learner@ksa:~/gl-q04/lab-m06

Syllabus

gl-q04/

  • m01/ Cross-Compiling OpenCV 4, V4L2 YUYV Cameras & QImage Bridges

    Cross-compile headless OpenCV 4 with ARMv7-A NEON/VFPv4 SIMD and V4L2 capture backends into isolated staging sysroots, filter CSI and UVC V4L2_CAP_VIDEO_CAPTURE nodes away from the i.MX6ULL /dev/video0 PXP mem2mem engine while converting YUYV 4:2:2 frames to RGB888, and bridge cv::Mat strides and reference-counted lifetimes safely into QImage with worker-thread photo encoding.

  • m02/ Embedded USB Bluetooth (BlueZ & QtBluetooth RFCOMM)

    Bring up USB Bluetooth adapters through Linux btusb, hci0, and bluetoothd D-Bus into Qt6::Bluetooth, register 128-bit SDP service UUIDs over dynamically assigned RFCOMM channels via QBluetoothServer, and engineer multi-client UTF-8 framed QBluetoothSocket hubs with safe qobject_cast sender routing and deleteLater() disconnect lifetime safety.

  • m03/ Smart-Home IoT Gateways: UART-Wi-Fi, Cloud APIs & Telemetry UI

    Diagnose hardware GPIO pin contention between board LED/KEY lines and external UART-to-Wi-Fi (ESP8266 AT) IO0/RST bootstrap pins versus native Linux wlan0 sockets, parse cloud JSON device rosters via QJsonDocument with Bearer token authentication and idempotent command framing, and reconcile optimistic HMI switch intent against confirmed device shadow state, monotonic heartbeats, and bounded retry queues.

  • m04/ 16 kHz WAV Voice Capture, VAD Metering & Speech-Recognition HMI

    Capture 16 kHz mono S16_LE PCM audio with back-patched 44-byte RIFF/WAVE headers, compute real-time RMS voice-activity levels and silence trimming, and integrate cached OAuth2 Base64/JSON speech-recognition REST intent routing on ARMv7-A Linux 6.12.

  • m05/ Edge Computer Vision & License-Plate Localization / OCR

    Localize vehicle license-plate regions on ARMv7-A Linux 6.12 using OpenCV luma conversion, Gaussian denoising, vertical Sobel gradients, Otsu thresholding, and morphological closing, then validate 25x-smaller cropped ROI OCR payloads.

  • m06/ Multi-Threaded UDP Video Surveillance Server & Client Capstone

    Architect a low-latency multi-client video surveillance pipeline on single-core Cortex-A7 Linux 6.12 by decoupling V4L2 capture and JPEG compression onto a worker thread, chunking frames into MTU-safe (< 1400 B) CRC-16 UDP datagrams, and evicting stale incomplete frames.

Prerequisites

  • requiredGL-Q01 & GL-Q02 (or equivalent): ISO C++20 RAII, Qt 6 worker threads, QNetworkAccessManager/QUdpSocket, and ARMv7-A CMake cross-compilation
  • requiredFamiliarity with Linux V4L2 (/dev/videoN), ALSA PCM capture, and POSIX serial/network interfaces
  • Bridged in M1Cross-compiles OpenCV 4 with ARMv7-A NEON/VFPv4 + V4L2, solves /dev/video0 PXP vs CSI/UVC enumeration, and bridges BGR/YUYV cv::Mat buffers into QImage without dangling-pointer crashes (Module 1)
  • Bridged in M2–M4Integrates Linux BlueZ USB Bluetooth RFCOMM (QtBluetooth), Smart-Home UART-Wi-Fi/MQTT cloud telemetry, and 16 kHz S16_LE RIFF/WAVE voice recognition pipelines (Modules 2–4)
  • Bridged in M5–M6Architects edge OpenCV license-plate ROI localization + OCR and multi-threaded V4L2/JPEG MTU-chunked QUdpSocket video surveillance servers and clients (Modules 5–6)

Series map

  1. GL-Q01Modern C++20 Foundations, QObject Meta-Object Internals & Qt 6 Widgets — C++20 RAII/move & ownership, CMake AUTOMOC, moc QMetaObject dispatch, event loops/timers, box/grid layouts, Model/View roles, QPainter & QTest
  2. GL-Q02Qt 6 Threads, Network/Serial/CAN Buses, SQLite WAL & Cross-Target Packaging — GUI-thread affinity, worker moveToThread & SPSC rings, QTcpSocket/QUdpSocket/HTTP, sysfs/gpiod/evdev/PWM, QSerialPort/SocketCAN, SQLite3 WAL & CMake sysroots
  3. GL-Q03Qt Quick / QML Scene Graph, Wayland/DRM-KMS, Multimedia & Industrial HMI — QQmlApplicationEngine & QML_ELEMENT bindings, Controls 2/SwipeView/ListView pooling, QSGNode/QRhi batching, eglfs_kms & Wayland QPA, V4L2/ALSA & watchdog HMI
  4. GL-Q04Embedded OpenCV 4 Vision, USB Bluetooth, Voice/IoT & Video Surveillance Projects — ARMv7 NEON OpenCV 4 cross-builds & YUYV camera capture, BlueZ QtBluetooth RFCOMM, Smart-Home IoT gateways, 16 kHz WAV ASR, License-Plate OCR & UDP video streaming this course

Related live cohorts: EMB-100 · Embedded Linux: Toolchain to Product (live cohort) NET-101 · Linux Networking Stack Internals (live cohort)

Companion formats

Slide deck

16:9 review slides with terminal listings, diagrams, and speaker notes.

Reference handbook

Printable HTML and PDF engineering reference covering every module and UAPI.

Flashcards

Leitner spaced-repetition terminal cards and TSV deck for syscalls, flags, and pitfalls.

Kernel Systems Academy engineering studio

Every Kernel Systems Academy course follows our 35% principles / 20% guided investigation / 45% engineering studio pedagogy. Listings are compiled against Linux 6.12 under strict compiler flags (-Wall -Wextra -Werror), and each module culminates in an evidence-checked lab graded locally by ./check.sh.

Frequently asked questions

Can I study this course offline from disk?

Yes. All fonts, stylesheets, diagrams, search indexes, and progress trackers use relative paths and local browser storage, so the bundle works identically over HTTP and file://.

How are the hands-on labs graded?

Each lab directory includes starter source files and an executable ./check.sh runner emitting TAP version 13 diagnostics (ok / not ok) and exiting 0 when every check passes.

What is included in the free preview?

Preview lessons and the opening module lab are unlocked in full so you can inspect our C11 listings, strace transcripts, and ./check.sh workflow before subscribing.

search — fzf

0/0 ───────────────────────────────────────────

keyboard shortcuts — less

/
search
f
focus mode
[
previous
]
next
?
help
Esc
close

figure