S
S
Sevlyar2013-10-10 07:25:55
Algorithms
Sevlyar, 2013-10-10 07:25:55

Computer Vision: Counting Tree Rings from a Photograph of a Tree Cut

Hello. The question arose of counting annual rings from a photograph of a tree cut.

Initial data example:
image

After some thought, I came up with the following algorithm (without details):

  • Processing of the image by filters, reduction to the black-and-white image;
  • Finding the center of the cut;
  • Moving in a straight line from the center of the slice to the edge, count the number of periods of color change from black to white and vice versa;
  • Repeat the previous step for several straight lines with a different angle;
  • Statistical processing of the set of values ​​obtained in the previous step.

I decided to process the image using the OpenCV library. I have no experience in solving problems of this kind and searching for information on the Internet did not help, so I got stuck at the first stage - experiments with OpenCV did not lead to results.

What filters should be used to process the image in order to bring it to black and white and annual rings were clearly visible? What algorithm can calculate annual rings? Please share your thoughts and experience in solving similar problems. Thanks to.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
gleb_kudr, 2013-10-10
@gleb_kudr

I would not translate into contrasting black and white, but would use greyscale. For any section of such a curve, a curve with humps will be obtained. We select the hump height threshold, which is taken into account and quite easily get the amount.
It is also worth playing around with the channels, perhaps one of the channels will have consistently higher contrast than the others (for example, the saturation channel). Then you can not even translate into black and white, but simply work with the channel.
It is also necessary to draw diameters at different angles, count the values ​​and average the indicators.

X
xanep, 2013-10-10
@xanep

Take a couple of images and play around with tools like CVIPTools, applying various filters. If you pick up a good filter, then the rest will not be difficult. You need to choose among filters that improve edge detection.
Here's what I came up with in a hurry after applying 2 filters

R
Renatk, 2013-10-10
@Renatk

Idea for increasing accuracy: Virtually draw the X and Y axis through the center of the tree and "rotate" the image around that coordinate system. And follow the movement of the dots (of a different color of the rings) near the tree.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question