Using OpenCV Python, How would you make all black pixels transparent, and then overlay it over original image -
i'm trying make colored mask, white. , idea to:
- make black pixels transparent in mask
- merge 2 images
- crop images
so original masked area white. kind of opencv python code/methods need?
like so:
original
mask
desired result (mocked - no green edges)
instead of
i suppose color threshold mask itself. result got in first quick , dirty attempt hue 43-81, saturation 39-197 , brightness 115-255 is:
the next step whole fill algorithm fill inside of mask. note 1 small area right selected.
the next step substraction of 2 results (mask-filled_mask):
again fill wholes , rid of noisy pixels binary opening:
last mask image created mask.
every step can adjusted yield optimal results. idea try steps out (for example imagej) workflow set , script steps in python/opencv.
refer http://fiji.sc/segmentation.
Comments
Post a Comment