Re: Best autofocus method for subsampled images
- From: "Levenspiel" <img.proc@xxxxxxxxx>
- Date: 26 Sep 2005 16:40:16 -0700
Martin Leese ha scritto:
> Levenspiel wrote:
> ...
> > Basically it
> > convolves the image with Sobel operators and then sums the square of
> > the gradient vector components. When doing such an operation I don't
> > know the legal values that the result can assume: in other words,
> > ignoring the theory behind this algorithm, I dunno if the values
> > returned by this operations must range between 0 and 255 (since I am
> > analyzing a 256 grey level image) or not.
>
> Unless I have misunderstood something, this is
> a simple pen and paper exercise. Start with a
> step from 0 to 255 (the maximum possible) and
> simply follow the algorithm on paper. You will
> then be able to see the values returned.
>
> --
> Regards,
> Martin Leese
> E-mail: please@xxxxxxxxxxxxxxxxxxxxxxxxxx
> Web: http://members.tripod.com/martin_leese/
Martin Leese, thanks for answering.
The problem is that this method requires to sum along x and along y the
square of gradient components. Doing so I have two choices:
1. Not converting data type, sticking to unsigned int: this leads to
almost the same value for all the images processed, because the value
obtained are so way bigger than 255, and so they are cropped to 255.
2. Converting data type from unsigned int to double...and about this
choice I have doubts of theoretical nature. What these numbers will
represent, if they are obtained from another class of data? Then, is
this conversion legal? I can't answer because I don't know the theory
behind Tenenegrad focusing method.
Logic would suggest that the latter method is correct, but in both
cases the results aren't stirring. That's why I also asked if someone
has experience with focusing of subsampled images.
Regards,
L.
.
- References:
- Best autofocus method for subsampled images
- From: Levenspiel
- Re: Best autofocus method for subsampled images
- From: Martin Leese
- Best autofocus method for subsampled images
- Prev by Date: Re: RGB conversion to 8 bit gray scale
- Next by Date: rolling ball algorithm
- Previous by thread: Re: Best autofocus method for subsampled images
- Next by thread: Fastest shape detection algorithm
- Index(es):