Improvement by several morphology way for machine vision SKD
The OVK Blob module provide a new version about extended functions in the libraries. It applies the common morphology operators of erode, dilate and open and close to an input image and generate an output image for the target one. It could further adjust ROI image for the better coverage to fill full the inspection condition. Here are the follow procedure:
As shown in the figure below, the red blockchain does not be processing for the internal holes. The morphology uses erosion calculations to make the area wider for 5 pixel. The converted area ROI is still broken but shrinks by 5 pixel.
As shown in the figure below, the red block does not perform pre-processing to fill the internal holes. It extracts an unsorted contour point group (Unsorted Contour), and then apply the morphological dilate operation it. The morphological operate width for 2 pixels to convert the ROI for different Parameters.
Finally, the unsorted contour point group has been expanded by 2 pixels and converted into a block-shaped ROI. This setting results in a rough outline block ROI.
The red block processing steps are as follows: pre-processing to fill the internal holes in advance, extracting an unsorted contour point group (Unsorted Contour) and then use the morphological dilate operation for this point group. ”Perform block ROI conversion for conversion parameters.
As a result, we can see that the unsorted contour point group has been expanded by 2 pixels and converted into a block-shaped ROI. Because there are no holes in the interior, a thick outline block ROI is formed on the outermost periphery.
As shown in the figure below, the contour can be sequentially ordered without pre-processing to fill up the internal holes. The morphology uses Dilate operation.
The morphological operation width is 2 pixels for the conversion parameter for block-shaped ROI conversion, and finally a rough outline block-shaped ROI is formed.
As shown in the figure , a sequential outline can be pre-processed to fill the internal holes in advance. The morphology uses dilate operation and the morphological operation width is 2 pixles. ”The conversion parameter is used to perform block-shaped ROI conversion. An internal solid block-shaped ROI is formed.