Image segmentations with gradient filled regions

流过昼夜 提交于 2019-12-11 17:27:17

问题


I have to work on image segmentation. The idea is to divide an image into regions which have pixels either of the similar color or the ones which can be represented by a gradient equation (linear or radial). I have found many algorithms which do the separation based on colors but could not find anyone which handles gradients. Does someone know any such algorithm or suggestions on how to go for it.


回答1:


Mean-Shift Segmentation might be what you are looking for. It is implemented in OpenCV. It is tolerant of smooth gradients, yielding a more natural result, or something that a human would come up with if he was converting an image to a paint-by-number.

Here is an image that was segmented with mean-shift:




回答2:


In gradient areas, the edge function (laplacian or other edge detection functions) will detect no edge (the result will be nearly zero ("black")). So, apply an edge filter on the image, and then you will have nearly black areas (for gradient or other similarly-colored sections) outlined by bright edges (where there was a strong difference in the original image). This image should be easily segmented by most segmentation algorithms (and if they classify the bright edges as their own segment, simply merge edge pixels back with the closest black area).

Note that you may want to find and segment only the gradient areas first, and then use a more decent segmentation algorithm on the original (non-edges) image. Note also that the edge detection doesn't work exactly for the radial gradients, so you may want to actually compute the edge function twice to acheive better results



来源:https://stackoverflow.com/questions/7544976/image-segmentations-with-gradient-filled-regions

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