Rock height search

Currently, I am helping a friend working on a geophysical project, I am in no way a professional in the field of image processing, but his interest in playing around with such problems. =)

The goal is to estimate the height of small rocks sticking out of the water, from the surface up.

The experimental equipment will be equipped with a 10-megapixel camera mounted on a remote meter with a built-in laser pointer. The β€œOperator” will point it at the rock, press the trigger, which will record the distance along the rock photo, which will be in the center of the image.

It can be assumed that the equipment is always kept at a fixed distance above the water.

As I see, there are a number of challenges to overcome:

  • Lighting conditions

    • Depending on the time of day, etc. a rock can be brighter than water or vice versa.
    • Sometimes the stone will have a color very close to water.
    • The position of the shadow will move throughout the day.
    • Depending on how rough the water is, there may sometimes be a reflection of the rock in the water.
  • Diversity

    • Scala does not have a uniform shape.
    • Depending on the type of breed, the growth of lichens, etc. the appearance of the rock is changing.

Good luck, there is no shortage of test data. Pictures of rocks in the water are simple. Here are some sample images: alt text I run the edge detector on images, and esp. in the fourth figure, poor contrast makes it difficult to see the edges: alt text Any ideas would be greatly appreciated!

+7
source share
3 answers

I don't think edge detection is best for detecting stones. Other objects, such as mountains or even reflections in the water, will have edges.

I suggest you try the pixel classification approach to separate the stones from the background of the image:

  • For each pixel in the image, extract a set of image descriptors from the NxN neighborhood centered on that pixel.
  • Select a set of images and manually mark the pixels as rock or background.
  • Use labeled pixels and appropriate image descriptors to train the classifier (for example, the Naive Bayes classifier).

Since rocks tend to have a similar texture, I would use texture image descriptors to train the classifier. For example, you can try to extract several statistical measures from each color shawl (R, G, B), as the mean and standard deviation of the intensity values.

+4
source

Segmentation of color to find a stone, along with edge detection to find the top.

To find the water level, I would try to find all the boundaries of the water threshold, and the horizon (if possible) would then place the plane on the surface of the water. Thus, you do not need to worry about rock reflections.

It is easier if you know the pitch angle between the camera and the water, and if the camera is aligned horizontally (roll).

ps. This is much more complicated than I thought - you do not know the distance to all the stones, so installing a plane is difficult.

It seems that reflection is actually an ideal way to find the level, look for the reliefs of symmetrical paths in detecting the edge of the cliff and choose the top?

+2
source

Pixel classification may work here, but will never give 100% accuracy. The difference in data is really great, the stones have different colors (which are also β€œdamaged” by lighting) and different textures. Therefore, global information must also be considered.

The problem you're dealing with is extracting the foreground. There are two approaches that I know of.

  • Minimization of energy through sections of the graph, see, for example, http://en.wikipedia.org/wiki/GrabCut (there are links to paper and the implementation of OpenCV). Some initialization ("seeds") must be performed (either by the user or by some prior knowledge such as a stone in the center and water on the periphery). Another input option is the approximate bounding box. It is implemented in the MS Office 2010 foreground extraction tool. The energy function of the possible foreground / background captions ensures that the foreground looks like foreground seeds and a smooth border. So, a minimum of energy corresponds to a good foreground mask. Please note that when approaching the classification of pixels, you must first outline a lot of images to study, then segmentation is performed automatically, while with this approach, you need to select seeds on each image of the query (or they are selected implicitly).

  • Active circuits . Aka snakes also require some user interaction. They are more like a Magic Magic Wand tool. They also try to find a smooth border, but do not consider the inner area.

Both methods may have problems with reflections (specific pixel classification). If so, you can try to find the approximate vertical symmetry and remove the bottom if there is one. You can also ask the user to mark reflaction as background when collecting statistics to reduce the graph.

+2
source

All Articles