Python 3+
The following libraries are also available: OpenCV 3.0+ Numpy, Numba
- k_means_thresholding.{py,cpp}
- filtered_k_means_thresholding. {py,cpp}
- step_2.txt
- count_eggs_4. {py,cpp}
● Input: a greyscale image
● Output: a binary image
● Testing sequence:
python3 k_means_thresholding.py input_image_1.jpg output_binary.jpg
● Input: a greyscale image
● Output: a binary image
● Testing sequence:
python3 filtered_k_means_thresholding.py input_image_1.jpg output_binary.jpg
● Inputs: a binary image, a positive integer n which is the minimum number of pixels in the component
● Outputs: the number of eggs with area larger than n pixels in the image written to stdout AND write a colour image to ./output_eggs.jpg where each egg found is a different colour.
● Testing sequence:
python3 count_eggs_4.py 50 output_binary.jpg labeled.jpg
input image:
grey image (after step 1):
labeled image: