POV-Ray : Newsgroups : povray.general : Counting gear teeth : Re: Counting gear teeth Server Time
24 Apr 2024 02:39:08 EDT (-0400)
  Re: Counting gear teeth  
From: Bald Eagle
Date: 14 Jun 2017 07:50:01
Message: <web.5941222360b2afcdc437ac910@news.povray.org>
scott <sco### [at] scottcom> wrote:

> You find the centre point of the gear.
That's something I still need to improve - I'm working with only the roughest
estimate at the moment.
I think the usual method of using where 2 angle bisectors intersect to find the
center of a circle ought to straightforward enough to implement.

> Then create a 2nd copy of the
> image rotated by some angle A about this centre point. You then do a
> difference of all the pixels in the original and rotated version

A difference of all the pixels...  a difference of ---  the rgb/gray values?
The vector length from the center of the circle?
Part of the challenge with this is differentiating "picture" and "object" and
separating and extracting one from the other for analysis.

> and sum
> up the errors (maybe ignore the centre part of the gear).

Sum up the differences in the above step to get a measure of the absolute change
as a function of the angle.


> As you increase angle A from zero you will get a different total error,
> the angle that gives the minimum error will be your tooth angle. You can
> use whatever algorithm you want to search for the A with the minimum error.

Or, I suppose the maximum would yield essentially the same result, if I
correctly understand how this all works.


With regard to the Fourier transform and its inverse - what are you using to
implement that?  Is it part of a proprietary software package?  A C library?  I
think I've been able to get the 1D version working fairly well, but I haven't
been able to spend enough uninterrupted time with the 2D variation to match up
the output to what I see in online examples.

Thanks as always for your suggestions and guidance   :)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.