I\'m a newbie in python and opencv, I want to create a track-bar to control the hierarchy of the function cv2.findContours but I don\'t know how to add it to the source code
I hope you have solved your problems by now, but I will try to explain it in case you haven't. You can create a window using the named window function and then associate the trackbar to that window.
cv2.namedWindow('test')
cv2.createTrackbar('thrs1', 'test', 300, 800, callback)
# Do whatever you want with contours
cv2.imshow('test', frame)
You will find the function createTrackbar explained here: cv2.createTrackbar
callback is pointer to the function that will be called everytime the slides changes it's position.