Finding external contours

I did use cv_retr_external but it’s not giving me the correct contour/outline of the object. i wonder if i need to filter contours based on hierarchy using a loop where the answer to that post seems to have done similar thing, but I don’t understand its syntax or data structure like what’s dst and what does vector do.