You are here: Start » Program Examples » Fertilizer Granulation
Fertilizer Granulation
Aim
Devise an algorithm which will examine the granulation of the fertilizer and detect grains that do not fit in specified range.
Input
Single image of the granulated fertilizer.
Output
Detected and circled correct and incorrect pills:
Hints
Perform some operations on the image to make all the round elements possible to distinguish and to recognize their center.
Solution (FIS)
- Add EnumerateImages filter to load the image from the disk directory.
- By using SmoothImage_Gauss receive blurred image with easily distinguishable dots.
- Add ImageLocalMaxima filter to detect all the centers of the circles-to-be.
- Create a circle using CreateCircle filter. To the inPoint connect outLocalMaxima.Point - the detected centers. Set inRadius parameter in filter properties as 8.
- Next fit circles to the original image. To do so use FitCircleToRidges filter. As inImage use the original image. Connect outCircle positions to the inFittingField.Axis.
- Compare outCircle.Radius using TestRealInRange setting inMinimum as 6 and inMaximum as 10.
- Add DrawCircles_TwoColors. As inImage use the original image. To inCircles connect outCircle from FitCircleToRidges filter. Connect outIsInRange to inConditions. All values in the range will have the True Color and values outside of the range will have False color. You can change their hue in the properties of the filter.
Macrofilter Main
Used Filters
Icon | Name | Description |
---|---|---|
![]() |
TestRealInRange | Checks whether a real value is in the specified range. |
![]() |
SmoothImage_Gauss | Removal of gaussian noise from images. |
![]() |
DrawCircles_TwoColors | Draws circles on an image with two colors, depending on the status of each circle (usually: green or red for pass/fail status). |
![]() |
FitCircleToRidges | Precise detection of a thin circular line, whose rough location is known beforehand. |
![]() |
CreateCircle | Creates a circle from an aligned point and radius. |
![]() |
ImageLocalMaxima | Detection of characteristic points, usually after some image transformations. |
![]() |
LoadImage | Loads a single image from a file. |
Further Readings
- Image Processing - A comprehensive introduction to Image Processing.
- Shape Fitting - This article presents usage of the Shape Fitting technique.