1 | initial version |
One approach is based on above image,
Threshold your image.
Find rotated rectangle for the contour.
Now fill your rotated rect, will give you mask for all parking area.
Perform bitwise xor between above mask and first threshold image, this will give you mask for each parking slot.
Using this mask you can analyse the background colour for parking slot, can decide whether it is occupied or not.
2 | No.2 Revision |
One approach is based on above image,
Threshold your image.
Find rotated rectangle for the contour.
Now fill your rotated rect, will give you mask for all parking area.
Perform bitwise xor between above mask and first threshold image, this will give you mask for each parking slot.
Using this mask you can analyse the background colour for parking slot, can decide whether it is occupied or not.