如何在复杂的图像(如岩石)上执行分割(在C ++中)

问题描述:

我正在尝试对岩石的图片进行分割(我已经附上了样本).最终目标是找到大概的岩石区域(不确定所需的方法是否为图像分割).

I'm trying to perform segmentation on a picture of rocks (I've attached a sample). The end goal is to find the approximate rock area (Not sure if the required method is image segmentation).

我尝试了几种算法:

  • 纹理分割无济于事,因为所有岩石都是相似的.
  • 我可以获得很多错误.由于阴影.虽然可以使用.

以下是输入图像的示例(您可以忽略篮球):

Here is an example of input image (you can ignore the basketball):

请具体说明.考虑到主题的复杂性,我有点陌生.

Please be specific as possible. Considering the complexity of the topic, I'm kind of new.

稍微模糊图像并应用像分水岭这样的图像分割方法或多或少可以解决这个问题.但是,由于岩石边界类似于岩石本身的纹理,因此这并非易事.我建议如下:

Slightly blurring the image and applying an image segmentation method like watershed can more-or-less solve the question. But as the rock boundaries similar to the texture of the rocks themselves, this won't be an easy task. I would suggest the following:

  • 如果不需要高精度,请尝试上述方法,并用一些手动注释的图像测量预期的误差.
  • 如果准确性非常重要,并且您可以寻求用户帮助,请创建一个用户界面,用户可以在其中在每块岩石上放置一个标记.然后使用从这些标记(也称为种子点)开始的分水岭变体执行种子分割. (OpenCV中的分水岭实现可以做到这一点.)