Growth rings from timber

Hi everybody!

I’m a total beginner in machine vision stuff so I came here for
some protips. My goal is to use openMV cam to figure out which
way timber is facing (is the outer side of wood at the top or
bottom). It should be done by checking which way the growth rings
are curved. I’ve been modifying the example codes, but my
learning-by-doing method has not been too succesful yet, though
by finding blobs has been working ~80% of the time every time :confused:

So if any kind so can offer me advice it would be greatly appreciated!

Hi, I can’t quite figure out what the problem is. Can you post some pictures of what you are trying to do so I can get a better idea?

In the picture there are two images taken from the end of the timber. The one in the left is facing downwards, you can see it from the way the growth rings are curved.
The one in the right side is facing upwards.

I see the example…

Mmm, I think you’ll need a feature detector for this particular kind of thing. No simple algorithm is going to work for this.

By a feature detector I mean a Haar Cascade or something like that. We’re going to be pushing out a lot of better AI like feature next year. But, right now we don’t have that.

We do have a Haar Cascade classifier which would work for this but it will require you to build up a large training data set.

In the mean time, something simple you could do is to call the fine_line_segments method on the image (with v2.6 firmware - not yet package with the IDE but its released on the openmv github), this method will tell you the line segments in the image. The line segments essentially are the feature vector you want to use to match on. But… we don’t have any feature vector matching code in the OpenMV Cam just yet for general purpose use.

Maybe there’s something you can do with the list of line segments. I.e. make a histogram of the line rotation angles.

By a large training set you mean about how many pics?

Not sure.

I’m sorry, I don’t know how to solve your problem with our current feature set. The difference between the two orientations is really small. Only a strong feature detector will have good results.

That said, we’ll work on solving this problem for the future. But, I’ll likely deliver a solution to late for you.