# PBL Notes
## OTSU [link](https://hbyacademic.medium.com/otsu-thresholding-4337710dc519)
* segment image in 2 parts (foreground and background)
* using threshold value
* threshold calculated by counting frequency of pixels and calculation "Between Class Variance" and "Within Class Variance"
* Such a threshold is selected where "between class variance" is max or "within class variance" is minimum.
## MEAN Thresholding
* segment image in 2 parts (foreground and background)
* using threshold value
* calculated by getting the mean value of all pixels
## K-Means [link](https://www.geeksforgeeks.org/image-segmentation-using-k-means-clustering/)
* Using K-Means to cluster the image into 'k' or 'n' categories and thus can segment image in more than 2 parts.
## U-Net
* Create a CNN model trained on sample images and given segmented masks.
* Use it to predict the mask for any new image.
## Mask R-CNN [link](https://www.analyticsvidhya.com/blog/2019/07/computer-vision-implementing-mask-r-cnn-image-segmentation/)
* It is a regional cnn approach to image segmentation.
* It first uses object detection to generate "Regions of Interest" in an image and then predicts mask for each region.
* Therefore this can segment multiple items from image.
* Can be seen as an advancement to U-Net.
## Watershed [link](https://dhairya-vayada.medium.com/intuitive-image-processing-watershed-segmentation-50a66ed2352e)
* We use the color intensity as an indicator of height.
* The image can then be analysed like a 3-d with troughs and ridges and smoothening it out gives us each plane as a segment.