alan-turing-institute/Palaeoanalytics

Ripple remover

Opened this issue · 1 comments

Exploring using morphological operations(i.e., erosions - cv2.erode() and dilations - cv2.dilate()) for removing ripples. So far this approach works well with images which have thinner ripple lines than scars.
1_erosion

2 erosions:
2_erosion

However, an opening - an erosion followed by a dilation (cv2.MORPH_OPEN) seems like the most promissing option.
5X5_opening

This approach works best when the ripples are of 'thinner' line quality than the rest of the illustration. For example, this image has fairly homogenous line quality, and thus poor(ish) results:

3_erosion
5X5_opening_2

Images with poorly connected lines do not work:
4_erosion

Images with lower than 300 dpi also perform very poorly (image is 200dpi).
low_res
low_res_2

@crangelsmith This and issues with arrows may best be addressed by designing custom kernels derived from image proportions. I believe this data is already stored in teh algo that seperates profile, platform, and dorsal surface. We've briefly discussed this. I will open a new issu for this.