Hello evryone!
I wanna start service of available parking spaces in different parking lots. The example of such parking lot is on picture below:
So as you can see there's no parking lines, which could be tracked. So what is the simpliest method to count available parking spaces ?
I read few topics about it on StackOverflow, but it doesn't help. I guess the easiest algorithm could be next:
1) Create a some number of ROI of same size as all parking line ( for ex. line with green car):
2) Make this ROI image grayscale
3)Make it blur and perform canny edge detection, maybe dilate:
4) Find contours and approximate this contours with polylines:
After it i need to approximate free empty space with rectangle to figure out how many cars can park on that parking spot. I found how to approximate contours with recnatgles, but how to do it with empty area, where is now contours at all?
There's other option: i could create a rectangle which is the same size as a car is (from camera point of view), than i move this rectangle from left side of roi to the right side, and count how many intersections this retagle will have with contours of ROI, if it's less than some number, it means, that it is a free parking spot.
I'm very new to OpenCV, and i need to make some progress in shortest time. I would really appreciate any help.
Thank you.