Skip to content
Advertisement

Tag: opencv

Filter contour area with smaller area

I would like to filter out cnts with small area. But I got the an error. What is the proper way to use filter? code error Answer The filter function returns a generator but the drawContours function expects a list. To fix this, use the list command. Another solution is to use a list comprehension to build the list, like

error: (-215:Assertion failed) !empty() in function CV2 Error

I am making a program in python that just draws a rectangle around a car. I am currently stuck on getting the coordinates of the car, here is the code: I am running in on an error with the function “cv2.detectMultiScale”. error: I have tried googling, it says to use cv2.CascadeClassifier(cv2.data.haarcascades + “cars.xml”) instead of cv2.CascadeClassifier(“cars.xml”). It didn’t work :(,

How to use cv2.fillpoly function properly [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 months ago. Improve this question I am trying to use the fillpoly function to fill two polygons at

Luminance Correction (Prospective Correction)

When I was searching internet for an algorithm to correct luminance I came across this article about prospective correction and retrospective correction. I’m mostly interested in the prospective correction. Basically we take pictures of the scene with image in it(original one), and two other ,one bright and one dark, pictures where we only see the background of the original picture.

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

Advertisement