UC-Irvine-CS175 / final-project-e-mcheese-2

final-project-e-mcheese-2 created by GitHub Classroom
0 stars 1 forks source link

Moved watershed to own file and finished implementing #9

Closed TerenceTYAranowitz closed 1 year ago

TerenceTYAranowitz commented 1 year ago

Description

Removed ApplyWatershed class from augmentations.py and added a new file called watershed.py under src/models. In the watershed.py class added a function called getAverages. This function finds the average intensity of non-black pixels. We ignore the black pixels as those are typically the background and we want it so that it doesn't skew our average intensity distribution. This is used to find the threshold in the get_mask function. With the threshold, we convert the image to a black-and-white image. Then with the black-and-white image, we find the foreground, background, and unknown region. We use this information to construct the mask per standard watershed technique.

closes #8 #5

How to use

How has this been tested

Checklist

JarrodRShepherd commented 1 year ago

Looks good! I'll merge this pull request.