Skip to content

Tag: opencv

Repeated drawings of bounding box

I would like to simply make a bounding box that uses points(any amount) to follow my mouse around. Error being when I draw the bounding box currently it repeats all the previous drawings and have repeated bounding boxes Answer You had already the right idea creating a clone from the original image, but just forgot to set the clone back

opencv cant write video from camera on python

im trying to save a video i get from a facetime camera on mac, i manage to show the video and flip it, but when i try to save it i get no file at all, and it wont show me any error, it did use to show me an error CAP_IMAGES: can’t find starting number (in the name of

Returning the count of circles in the document

I have written code defining circles in documents. Can I return to the variable the count of circles found in the document? Thank you. Answer Well, you’re already doing to draw the circles, so circles[0, :] is presumably an iterable of circles. Wouldn’t it then make sense that would give you the number of circles to draw?

Find end point on each line using OpenCV

I’m trying to get the coordinate of every end point on every line, but i couldn’t come up with a solution, this is what I’ve currently got but its finding the outline of the lines not the lines itself Answer The hit-or-miss transform can be used to find end points of a line after skeletonization. Code: