Skip to content

KnowledgePending/Shark-Image-Extraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shark-Image-Extraction

🦈🔬Underwater Shark Image Extraction Without Machine Learning

Prerequisites

pip3 install opencv-contrib-python numpy

Algorithm:

  1. Create multiple images from a combination of different channels and color spaces
  2. Create an image with a detailed view of the shark in grayscale and color
  3. Create a binary mask that can identify the shark and part of the image we don't want
  4. Create a 2nd binary mask that can identify the shark and a different part of the image we don't want
  5. Combine and clean the two masks to get a rough outline of the shark
  6. Fill the outline/edges so that it can actually be used as a mask
  7. Use the mask to extract only the shark from the detailed image
  8. Crop the image to only contain the shark using the mask as a guide
  9. Replace the background color with white
  10. Display both a Grayscale and Color version of the shark