views:

158

answers:

4

What would be the sanest/simplest approach to do wall detection on static images?

It doesn't have to be in real-time. Right now I'm using corner detection, but is there a simpler way to detect only the walls and discard all the smaller irrelevant corners detected in foreground objects?

edit Target images are standard pictures of indoor environments. Think robot navigation.

+1  A: 

You might try an edge detector such as the canny operator: http://en.wikipedia.org/wiki/Canny_edge_detector.

It is probably insufficient by itself, but could be useful in conjunction with your corner detection. I'm thinking long straight edges with corners on either end would be a pretty strong indication of a wall.

jlewis42
A: 

Simple approach:

  • a detection algorithm based on luminosity (or color driven)
  • taking into account a number of grouped (a square or disk) pixels (e.g. if there is a ` pixel hole, ignore it and consider the wall continues)

For the luminosity / color - very basically you can take the average of the 3 RGB bytes from a JPEG image pixel, if it is color driven you consider a wall if the pixel is, for instance, 50<R<60, 100<G<120, 10<B<12.

To consider a group of pixel, a convolution matrix, that gives more weight to the central pixels, provides a fair estimation of what is the wall, and what is not. This is to be used in the case the image is not pure "black and white", is a bit blurred or if the contours cannot be determined accurately pixel / pixel.

ring0
+2  A: 

Unfortunately, without (perhaps a lot) more specification, I don't think we'll be able to give you a simple approach that works. For example, what distance range are you anticipating being from the walls? (Too close, and there are no 'lines' as you're just staring at the wall, not the corners it forms with other walls, the ceiling and floor.) Are the walls solid colors or could there be posters, wallpaper, patterns, etc? Do closed doors and/or windows count as part of the 'wall'? What are the lighting conditions? Specular highlights, dim areas, etc. can cause colors to appear quite different.

And so on. I guess what I'm saying is: computer-vision is extremely hard in the general case. If your problem has specific settings that reduce the space of "all indoors" to something a little easier to make some assumptions about, we'll need to know them. If not, there probably is no 'simple' approach.

Dusty
Basically, what I have is a robot in the middle of a room (think bedroom, bathroom, etc) and I need to find out the actual shape of the room (i.e. the distance until each of the walls, and their position).
Vicent Marti
Do you know anything about the rooms that you could use as reference sizes? If this is with a single image how would you tell the difference between a tall wall far away and a shorter wall closer to you?
Dusty
+1  A: 

Not an easy problem, I could recommend you a few papers, working on single images :

If you have multiple images (ie your robot can move) you can go through 3D reconstruction but you'll need calibrated camera and than can be a pain in the *.

Can you give some infos ?

  • Have you access to the internal parameters of your camera ? (focal length, skew...)
  • Have you multiple images ? If so, are they from the same point with only a rotation movement (like the robot is staying in place and turning on himself).
  • What is the application ?

Without a size of reference no way to tell the absolute distance : you could be in a giant room with giant objects or very small room with very small objects.

Loïc Février