View Code? Open in Web Editor
NEW
Rudimentary Apple Detector Using Thresholding and Morphological Operations
apple_detector's Introduction
Rudimentary Apple Detector Using Thresholding and Morphological Operations
- Problem was simplified by making the assumption that apples to be detected were near/at the red color spectrum
- Input image was converted into HSV color-space since hue stays constant in variable illumination environments, while RGB doesn’t.
- Input image is thresholded by red spectrum in HSV, changing pixels outside of red to black.
- Image is then converted to binary, keeping red colored pixels in white, and the rest black.
- Morphological operations are applied to the binary image, removing noise and separating individual blobs.
- Remaining blobs are filtered by their effective area on the image. Keeping those within the specified area.
- Detected apples are circled in the output image.
![a](https://cloud.githubusercontent.com/assets/13475486/25365537/65ece204-2937-11e7-8c2d-e35c14a7c088.png)
![b](https://cloud.githubusercontent.com/assets/13475486/25365538/65f91998-2937-11e7-8f1c-27fba2e74fbc.png)
![c](https://cloud.githubusercontent.com/assets/13475486/25365539/65f9aac0-2937-11e7-8726-51558b2dbb0b.png)
apple_detector's People
Contributors
Watchers