Parking space detection method and system