I was very confused while doing the project and realized that I needed help. First of all I have 2 images and one of these images contains highway with empty and the other one contains highway with cars on it. I am asked to find the number of vehicles in the second picture using OpenCv and these two images, but I don't know which paths to follow. More precisely, I don't know how to use the two images together.(Using Python)
CodePudding user response:
I would suggest
Reducing the frist picture from the second.
1.1. Since they are the same (as far as I understand), you will get 0 values everywhere but the cars.
Use
cv2.findContours
on the result on step 1. to get the contour of each car,Count the number of contours, should match the number of cars