Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What's the best approach to detect an inclined plane (wheelchair ramp) in a picture?

First of all I want to establish my absolute newbie status in the field of computer vision, so please excuse any mistake or misconception that I may express.

I have to develop an application whose goal is to detect (and measure, if possible) wheelchair ramps in pictures of building entrances. I'm sorry I don't have enough karma to provide links or attach example pictures. Searching 'wheelchair accessible building' in google images provides some good examples.

This would be an Android app, running on a phone or tablet, making use of its camera. Its intended users are inspectors whose job is to determine if a building is wheelchair accessible. Ideally the app would automatically detect and measure the dimensions (particularly the slope) of any ramps found in the picture. It does not matter whether to use static pictures that the user has to "snap", or a running video in real-time, whatever works best. Input from the user, if practically feasible, could be included, such as providing a certain dimension reference, or having to position the camera in a certain way.

From what I've read about opencv, I have the following "starting points". First of all I would try to estimate the camera pose (which I understand makes it possible to transform the picture coordinates to world coordinates). Basically I would try to determine the direction of the main coordinate axes in order to detect "vertical" and "horizontal" planes in the image, i.e. walls and ground respectively.

I believe that the houghline transform would be useful in detecting straight lines, which then I would "group" into different sets according to their direction (basically obtaining the cartesian axes). Once this is done, I would try to detect the ramp by searching for "inclined" lines, i.e. lines not aligned with any of the cartesian axes.

I understand that finding real-life right angles in pictures is not straightforward given the changes in perspective. Is there any opencv function aimed at this particular detection? Also I would like to point out that in many of the pictures there would be stairs, so maybe they could be used to improve the detection or as some kind of dimension reference?

Do any of my reasonings make any sense? Am I completely overseeing or misunderstanding anything? Are there any other transforms or opencv functions that would be useful for my case? Can anyone point me to a better approach to the problem?

From my limited cv knowledge I feel like this is a complex problem, and that finding a fully automatic detector would be very difficult given the variability of building entrances that exist in the world. An answer along the lines of "this is practically impossible" or "this can't be done practically" is welcome, although I would very much appreciate any helpful advice, direction or explanation.

Excuse me for the long post, and thank you in advance for any help!