01
Stage 1 – Product Image Capture
Process
Industrial cameras continuously capture images of products moving through the manufacturing production line.
Tools
OpenCV
Implementation
The application connects to the camera feed and captures frames at the required inspection rate. OpenCV performs basic image acquisition and preprocessing such as resizing, cropping, and normalization.
02
Stage 2 – Image Preprocessing
Process
Captured images are prepared for the computer vision model.
Tools
OpenCV
Implementation
The application removes unnecessary image information, adjusts the image size, and prepares the frame in the format required by the inference model. This reduces unnecessary processing and helps maintain low inference latency.
03
Stage 3 – Edge Defect Detection
Process
The processed image is passed to the computer vision model running on the edge device.
Tools
ONNX Runtime
Implementation
The trained defect-detection model performs local inference and identifies whether the product is normal or defective. If required, the model can also identify the location or type of defect. Edge inference avoids sending every image to the cloud before making the inspection decision, which supports low-latency manufacturing inspection.
04
Stage 4 – Inspection Result Generation
Process
The inference output is converted into an inspection result.
Tools
PostgreSQL
Implementation
The application records information such as product ID, inspection timestamp, Defect status, Defect type, Confidence score, Camera ID and Production line ID. The inspection metadata is stored for later analysis.
05
Stage 5 – IoT Result Transmission
Process
Inspection results are published from the edge device to the cloud.
Tools
MQTT
Implementation
The edge application publishes inspection results to MQTT topics such as: factory/line1/inspection/results. Only required metadata and selected images are transferred instead of continuously sending the complete camera stream. MQTT is commonly used in industrial IoT architectures for lightweight machine-to-machine communication.