The Defect Detection accelerated application is a machine vision application that automates detection of defects in mangoes and sorting in high-speed factory pipelines by using computer vision library functions. The Defect detection application detects defects in a mango.
The Application has following pipelines:
- Gaussian Otsu pipeline, which includes functions xf::cv::custom-bgr2y8,
xf::cv::GaussianBlur, xf::cv::OtsuThreshold.
- Preprocess pipeline, which includes functions xf::cv::Threshold,
xf::cv::fw_cca
. - CCA custom pipeline, which includes functions
xf::cv::rev_cca
,xf::cv::pass_2
.
In the Gaussian Otsu pipeline, the BGR input image is converted to custom y8 format and the output is processed through GaussianBlur and OtsuThreshold which computes threshold value to mark the defects.
The Preprocess pipeline, which contains the xf::cv::Threshold
function and xf::cv::fw_cca
is moved to the preprocess pipeline to improve performance
where it processes the image in forward direction to get information on edge between mango pixels and background pixels.
The CCA custom pipeline, which includes xf::cv::rev_cca
, which processes the image in a backwards direction and xf::cv::pass_2
which adds
both forward and backward passes and gives the number of defect pixels.