I have been trying to find the outline (external contour) of a whiteboard marker in an Image. I have tried using openCv for this (seems to be the least complicated). I have gray-scaled and filtered the Image but I still can't get to a good enough results. The Images I am working on are very good (e.g don't have any other object in them) and I am quite sure this is possible (without the use of heavy DL algorithms).
This is what I am getting:
This is (roughly) what I am trying to get (this was done using Photoshop's magic wand):
I have tried different algorithms but none seem to work (The result above just uses cv2.findContours with cv2.RETR_TREE and cv2.CHAIN_APPROX_SIMPLE). I have found many people asking some very similar questions but the answers given to them did not work for me.
(for example: Process image to find external contour or https://answers.opencv.org/question/182345/how-do-i-draw-only-external-contour/)
Here is the original image:
In any case, thanks for your help!