polar-computing / 3DSeals

0 stars 2 forks source link

Gamma search too sensitive #13

Open aborowicz opened 8 years ago

aborowicz commented 8 years ago

gamma_search.py tries to find the gamma_adjust value that yields the most contours (sum of all contour lengths) when thresholding to binary. It tries ~50 gamma values. It is generally good.

Problem: On seals with dry fur and good lighting in high-res images, the fur can cast minute shadows on itself, creating a lot of noise essentially. Gamma_search thus returns the gamma-corrected image which retains a lot of that noise, resulting (in this case) in images with an order of magnitude more segments found than normal (over 8000 here on a seal with fairly little patterning [GEOR_122515_W1]).

Solutions?: This could be solved with a light blurring, but that might not be appropriate for lower-res images or seals with more intricate patterning. Perhaps an extra step can be added to gamma_search similar to the the cut-offs in the watershed script that excludes contours below a certain length. eroded_seal