Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Free parking space detection

Hello evryone!

I wanna start service of available parking spaces in different parking lots. The example of such parking lot is on picture below:

image description

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):

image description

2) Make this ROI image grayscale

3)Make it blur and perform canny edge detection, maybe dilate:

image description

4) Find contours and approximate this contours with polylines:

image description

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.

Free parking space detection

Hello evryone!everyone!

I wanna start service of available parking spaces in different parking lots. The example of such parking lot is on picture below:

image description

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):

image description

2) Make this ROI image grayscale

3)Make it blur and perform canny edge detection, maybe dilate:

image description

4) Find contours and approximate this contours with polylines:

image description

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.