  Image segmentation is a concept that is often used for object detection. This
detection has difficulty detecting objects with backgrounds that have many
colors and even have a color similar to the object being detected. This study
aims to detect fish using segmentation, namely segmenting fish images using
k-means clustering. The segmentation process is processed by improving the
image first. The initial process is preprocessing to improve the image.
Preprocessing is done twice, before segmentation using k-means and after.
Preprocessing stage 1 using resize and reshape. Whereas after k-means is the
contrast-limited adaptive histogram equalization. Preprocessing results are
segmented using k-means clustering. The K-means concept classifies images using
segments between the object and the background (using k = 8). The final step is
the morphological process with open and close operations to obtain fish
contours using black and white images based on grayscale images from color
images. Based on the experimental results, the process can run well, with the
ssim value close to 1, which means that image information does not change.
Processed objects provide a clear picture of fish objects so that this k-means
segmentation can help detect fish objects.
