"硬QUOT;用python监控图像分割 [英] "hard" supervision in image segmentation with python

查看:292
本文介绍了"硬QUOT;用python监控图像分割的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Python中有几种用于分段的包和方法。但是,如果我知道apriori某些像素(而没有其他像素)对应于特定对象,我该如何使用它来分割其他对象?

There are several packages and methods for segmentation in Python. However, if I know apriori that certain pixels (and no others) correspond to a particular object, how can I use that to segment other objects?

在python中实现哪些方法会不会采用这种方法?

Which methods implemented in python would lend themselves to this approach?

谢谢。

推荐答案

你我想看看半自动图像分割。半自动化视角中的图像分割意味着您知道之前确定某些像素所属的类 - 前景或背景。鉴于此先验信息,目标是最小化能够将其余像素最佳分割为前景和背景的能量函数。

You'll want to take a look at semi-automated image segmentation. Image segmentation in a semi-automated perspective means that you know before hand what class certain pixels belong to - either foreground or background. Given this a priori information, the goal is to minimize an energy function that best segments the rest of the pixels into foreground and background.

我所知道的最好的两种方法是Graph Cuts和Random Walks。如果你想研究它们的基本原理,你应该分别阅读Boykov(Graph Cuts)和Grady(Random Walks)的规范论文:

The best two methods that I know of are Graph Cuts and Random Walks. If you want to study the fundamentals of both of them, you should read the canonical papers by Boykov (Graph Cuts) and Grady (Random Walks) respectively:

  • Graph Cuts - Boykov: http://www.csd.uwo.ca/~yuri/Papers/ijcv06.pdf
  • Random Walks - Grady: http://webdocs.cs.ualberta.ca/~nray1/CMPUT615/MRF/grady2006random.pdf

对于Graph Cuts,OpenCV使用GrabCut算法,这是原始Graph Cuts算法的扩展: http://en.wikipedia.org/wiki/GrabCut 。基本上,您围绕要分割的对象周围的框,并使用高斯混合模型来模拟前景和背景,并且对象将从此框内的背景中分割出来。此外,您可以在框内添加前景和背景标记,以进一步限制解决方案,以确保您获得良好的结果。

For Graph Cuts, OpenCV uses the GrabCut algorithm, which is an extension of the original Graph Cuts algorithm: http://en.wikipedia.org/wiki/GrabCut. Essentially, you surround a box around the object you want segmented, and Gaussian Mixture Models are used to model the foreground and background and the object will be segmented from the background inside this box. Additionally, you can add foreground and background markers inside the box to further constrain the solution to ensure you get a good result.

查看此官方OpenCV教程了解更多信息详细信息: http://docs.opencv.org/trunk/doc /py_tutorials/py_imgproc/py_grabcut/py_grabcut.html

Take a look at this official OpenCV tutorial for more details: http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_grabcut/py_grabcut.html

对于Random Walks,这是在 scikit-image 库,这是一个很好的教程,如何让他们的官方网站上的细分和运行: http://scikit-image.org/docs/dev/auto_examples/plot_random_walker_segmentation.html

For Random Walks, this is implemented in the scikit-image library and here's a great tutorial on how to get the segmentation up and running off of their official website: http://scikit-image.org/docs/dev/auto_examples/plot_random_walker_segmentation.html

祝你好运!

这篇关于"硬QUOT;用python监控图像分割的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆