polar-computing / 3DSeals

0 stars 2 forks source link

Pre-process regions #9

Open aborowicz opened 8 years ago

aborowicz commented 8 years ago

We lose patches because some areas are less contrasty than others and these regions are lost during the gamma/binary stage.

After foreground extraction, identify regions and run the preprocess steps on each region independently.

Downside: probably going to lose patches at the intersections or create patches that are each half of a real patch that falls in two regions

aborowicz commented 8 years ago

Handled now in a sort-of ugly way. It'd be nice to run an ML classification on it instead. Right now the approach is to adjust gamma, blur the image, dilate, blur again, and convert to binary to mask. It then takes the opposite of the mask, so we end up with one image with only the lighter areas present, and one with only the darker areas.

Watershed_seg (now a cleaner watershed_seg_compact version) was adjusted to include a for loop to handle both the light and dark images. It writes all segments to the same output.