opencv floor detection by segmentation

你说的曾经没有我的故事 提交于 2019-12-05 02:38:43

问题


I'm working on a a way to detect the floor in an image. I'm trying to accomplish this by reducing the image to areas of color, and then assuming that the largest area is the floor. (We get to make some pretty extensive assumptions about the environment the robot will operate in)

What I'm looking for is some recommendations on algorithms that would be suited to this problem. Any help would be greatly appreciated.

Edit: specifically I am looking for an image segmentation algorithm that can reliably extract one area. Everything I've tried (mainly PyrSegmentation) seems to work by reducing the image to N colors. This is causing false positives when the camera is looking at an empty area.


回答1:


Since floor detection is the main aim, I'd say instead of segmenting by color, you could try separation by texture.

The Eigen transform paper describes a single-value descriptor of texture "roughness" using the average of eigenvalues over a grayscale window in the image/video frame. On pg. 78 of the paper they apply the mean-shift segmentation on the eigen-transform output image, effectively separating it into different textures.

Since your images are from a video feed, there can be a lot of variations in lighting so color segmentation might pose a few problems (unless you're working with HSV and other color spaces as mentioned above). The calculation of the eigenvalues is very simple and fast in OpenCV with the cvSVD() function.




回答2:


If you can make the assumption about colour constancy your main issue is going to be changes in lighting that will throw off your colour detection. To that end, convert your input image to HSV, HSL, cie-Lab, YUV or some other luminance-separated colourspace and segment your image based on just the colour part (leave out the luminance value, V, L, L and Y in the examples above). This will help you overcome the obstacle of shadows and variations in lighting.



来源:https://stackoverflow.com/questions/6607990/opencv-floor-detection-by-segmentation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!