<<Prev 1 2 3 4 5 6 7 Next>>
Merging Blobs
To merge the blobs we need to expand all white parts of the image until they touch with nearby parts. An
easy way to do this is with a combination of erode and dilate
modules. We first perform a 2 pixel dilation in all directions.
This helps to connect the digits but in some situations a thin line still separates the digits. If we continue
to use the dilate module we risk the chance of digits being merged into each other. So instead of using
the dilate module to dilate in all directions we simply specify the expansion to only happen in the vertical
direction.
Now that the digits have been merged we reduce them closer to their original size by using the erode
module with a 2 pixel erosion.
This reduces the digits down to a more visually appealing size.
Once the digits have been segmented from the original image we now need to understand the digit properties
as represented by blobs to help eliminate other objects in the image that are not digits. This helps to reduce
the clutter in the final stages and provides a more stable result.
You can notice that the digits appear within a square rectangle. This rectangle was initially formed by the
white casing in contrast to the lower light LCD part of the panel. We can use this characteristic to better
focus on just the digits. To do this filtering we use the Blob Filter module
with a single 'inner' parameter.
You will notice that while helpful there are still two triangles left in the image. We could use the blob
filter to further filter based on triangles and invert that selection to remove them but instead we
will use the final step to eliminate those objects.
<<Prev 1 2 3 4 5 6 7 Next>>
|