Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Image processing > Re: Accurate ed...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 31 of 65 Topic 4668 of 4905
Post > Topic >>

Re: Accurate edge detection?

by aruzinsky <aruzinsky@[EMAIL PROTECTED] > Jul 25, 2008 at 08:00 AM

On Jul 24, 3:04=A0pm, slus...@[EMAIL PROTECTED]
 wrote:
> On Jul 24, 12:55=A0pm, aruzinsky <aruzin...@[EMAIL PROTECTED]
> wrote:
>
>
>
>
>
> > On Jul 23, 2:48=A0pm, slus...@[EMAIL PROTECTED]
 wrote:
>
> > > On Jul 22, 11:59=A0am, aruzinsky <aruzin...@[EMAIL PROTECTED]
>
wro=
te:
>
> > > > On Jul 22, 8:04=A0am, slus...@[EMAIL PROTECTED]
 wrote:
>
> > > > > Thank you for your interest and offer to review some sample
image=
s.
> > > > > Unfortunately, our concern is not on the software or algorithmic
=
side,
> > > > > but on the optical side. =A0As I mentioned in my original post:
>
> > > > > "Does anyone have references they can point to (or their own
> > > > > pesuasive
> > > > > arguments) that describe where the true edge location should be
> > > > > relative to the edge image function?"
>
> > > > I already did. =A0What is wrong with you?
>
> > > > > I also mentioned that I originally posted to sci.optics, then
add=
ed
> > > > > sci.image.processing because I thought the folks here might be
mo=
re
> > > > > aware of relavent references. =A0The (apparently) commonly held
b=
elief
> > > > > that the maximum slope of the edge image, or the midpoint
between=
 the
> > > > > maximum and minimum grey level values of the edge image
correspon=
ds to
> > > > > the true edge location seems unmotivated or unsup****ted to me,
ev=
en
> > > > > though it "feels" like common sense. =A0
>
> > > > That is an algorithm, albeit a really stupid one that is not
common
> > > > sense, so don't tell me that you are not interest in algorithms.
> > > > Furthermore, that is not a commonly held belief, e.g., it is
common
> > > > knowledge that shock filters sharpen an edge around the inflection
> > > > point (the inflection point is preserved) and nobody, I know of,
> > > > pretends that shock filtering is deconvolution.
>
> > > > > We have also performed bench
> > > > > experiments that suggest that neither the max. slope nor the
grey
> > > > > level midpoint corresponds to the true edge, with errors being
in=
 the
> > > > > range of 0.2 to 0.45 pixels in the experimental set up we used.
>
> > > > I hope my tax money didn't fund that busy work.
>
> > > > >=A0We
> > > > > are continuing our own investigation, but I have to believe that
> > > > > someone has already done this at some time and published their
> > > > > results. =A0I'd love to find out that our own efforts at
inventin=
g the
> > > > > wheel are unecessary. :-)
>
> > > > I already gave you a reference to a relatively simple algorithm
tha=
t
> > > > might do better than 0.2 pixels. =A0 It would be foolish not to
try=
 it.
>
> > > Hmm. I appear to have offended you. =A0If it was because I had not
ye=
t
> > > acknowledged your reply to my query, I apologize. =A0I was, in fact,
> > > digesting your comments as well as the two references you provided.
I
> > > was also reading what I found upon looking up "edge interpolation"
as
> > > you suggested. =A0In the meantime, Andrew offered a suggestion that
I
> > > was more easily and quickly able to address, which included my
> > > referring back to, and quoting my original post. You may have
> > > interpreted that as my ignoring your suggestions.
>
> > > Regarding your references, I believe I can see the point(s) you are
> > > making, but I also don't see the relavence to the *physics* of
> > > correlating the image of an edge to the location of the real edge.
We
> > > might be talking past each other here, much as the Americans and
Brit=
s
> > > are separated by a common language. :-)
>
> > > Let's ignore pixels for a moment, and pretend we can sample the
image
> > > of a back lit knife edge with infinite resolution, casting God's eye
> > > upon the screen on which the light eventualy falls. Are you familiar
> > > with Fresnel diffraction at an edge? When one looks at a plot of
> > > intensity of the light around the "shadow" zone, one sees there is
> > > light in the region that would otherwise be forbidden if there was
no
> > > diffraction. =A0One also sees that "past" the edge, the light
intensi=
ty
> > > climbs, reaches a peak, then oscillates in a decaying fa****on,
> > > eventually reaching a uniform intensity.
>
> > > If you look closely at this plot, we see that the point on the light
> > > intensity curve that in fact corresponds to the true location of the
> > > knife edge is of an increasing slope, but is neither the maximum
slop=
e
> > > (gradient), nor an inflection point, nor, generally speaking, is it
> > > midway between the minimum light level and the average high light
> > > level, much less the peak. =A0Thus, edge finding techniques that
depe=
nd
> > > in some fa****on on maximum slope or gradient (Sobel, Canny ,etc.) or
> > > 50% threshold level, would not find the point on this edge image
that
> > > corresponds to the position of the true physical edge. Of course
this
> > > is just a start. =A0The edge image is further complicated by the
many
> > > other phenomena that occur when using lenses to place the image onto
=
a
> > > pixel detector.
>
> > > My own readings found, in many cases, discussion of edge detection
> > > schemes that do in fact start with the presumption that the maximum
> > > slope or gradient of an edge image should in some way correspond to
> > > the true location of the edge, but with no explanation of why the
> > > author believes this to be so. =A0My guess is that this is something
> > > that is simply "understood" by those working in the field, and is
> > > passed along from one person to another without question. =A0It's
> > > obvious that you hold no such belief, but at the level of my
> > > investigation it *is* common.
>
> > > As for time spent investigating this, rest assured that this is
> > > strictly a capitalistic venture using private money, snide comments
> > > not withstanding.
>
> > > It may be of no interest to you, but others might find something
> > > interesting. =A0I'm cutting and pasting here a brief description of
o=
ur
> > > experiments that I also orignally posted on sci.optics:
>
> > > Using a
> > > chrome-on-glass bar target that is measured as 12.503mm long
> > > +/-0.003mm, we grabbed images with a telecentric lens and red LED
> > > collimated back light. =A0We then used a micrometer stage to move
the
> > > target 12.503mm (again, with an error of +/-0.003mm) -- so that the
> > > trailing edge at the new postion corresponds to the leading edge of
> > > the original position. =A0The direction of motion was perpendicular
t=
o
> > > the lens optical axis to within 0.25 degrees. =A0We then used
various
> > > edge detection methods, including the 2nd derivative of the edge
with
> > > a fit to a parabola, as well as the simple 50% local thresholding,
> > > among others. =A0What we found consistently through different
positio=
ns
> > > in the field of view and different new set-ups is that the trailing
> > > edge appeared to fail to move far enough to coincide with the old
> > > leading edge. =A0The error range was ~0.2 to 0.45 pixels, or about
> > > 0.015mm to 0.034mm in real world units -- always considerably larger
> > > than target and motion error, and alway in the same direction of
> > > error.
>
> > > Another way to interpret this result is that an object consistently
> > > looks larger than it actually is. (If the bar target appears to be
> > > 12.523mm, and you move it 12.503mm, the trailing edge will fail to
> > > "catch" the initial position of the leading edge.)
>
> > > We've tried this with different lens f-numbers from F/45 to F/8 and
> > > did not see an obvious trend that followed the aperture, but on this
> > > front we've only made a small number of tests -- 4 at each f-number.
> > > The errors average ~0.3pixels, with the standard deviation ~0.05.
>
> > > I will also add that we have used two different cameras (AVT
Stingray
> > > 145b and Sony XC-ST70) out of suspicion that a non-linear
responsivit=
y
> > > could be the culprit. =A0While differing slightly in detail, we saw
> > > essentially the same result.
>
> > > Spencer- Hide quoted text -
>
> > > - Show quoted text -
>
> Thank you very much for taking the additional time!
> Alright, let me make sure of my toddler steps here:
>
>
>
> > Consider a simple 1D example:
>
> > "Knife edge" is a discrete step function x.
>
> > x =3D [ 0 0 0 1 1 1 1 1]T
>
> > A =3D
> > [
> > 1/2 1/2 =A00 =A0 =A00 =A0 0 =A0 =A00 =A0 0 =A0 0
> > 0 =A0 =A0 0 =A01/2 1/2 =A00 =A0 =A00 =A0 0 =A0 0
> > 0 =A0 =A0 0 =A0 0 =A0 =A00 =A01/2 1/2 =A00 =A0 0
> > 0 =A0 =A0 0 =A0 0 =A0 =A00 =A0 =A00 =A0 0 =A01/2 1/2
> > ]
>
> So generally speaking, A represents the PSF of the lens, Fresnel
> diffraction at the edge, lens aberrations, etc. =A0Essentially the whole
> world of what goes into making the image of the edge no longer a step
> function, right?
>
>
>
> > A represents convolution with [1/2 1/2] followed by a factor of two
> > decimation. =A0You can see A is undetermined and not invertible.
>
> Decimation? I can see I'll need to pull out my old linear algebra
> text. =A0Or is this something more specific to image processing?
>
>
>
>
>
>
>
> > Your observed values would be
>
> > y =3D Ax =3D [ 0 1/2 1 1 ]
>
> > In estimating x from y, given A, you have to do something that vaguely
> > resembles an inversion of A to estimate x' of x.
>
> > For example, you can softly constrain the discrete derivatives of x'
> > to zero.
>
> > y' =3D [ yT 0T ]T
>
> > A' =3D [AT =A0 w*BT]T
>
> > w is scalar weight
>
> > B =3D
> > [
> > 1 -1 0 =A0... 0 0
> > 0 =A01 -1 ... 0 0
> > ...
> > 0 0 0 ... =A01 -1
> > ]
>
> > Now, A' is overdetermined
>
> > solve
>
> > min || y' - A' x' ||
> > =A0x'
>
> > ||.|| is a norm or possibly a function similar to a norm but not
> > necessarily convex. =A0L2 norm is not recommended because it will
cause
> > oscillations. =A0L1 norm recommended. =A0All of this has a statistical
> > interpretation which I won't get into for simplicity.
>
> > Your A will have to incor****ate a different PSF for diffraction
> > thingy.- Hide quoted text -
>
> > - Show quoted text -
>
> Yep, I definitely need to brush up on my linear algebra. =A0But let me
> see if I've at least got the gist of this.
>
> A cannot be known completely, nor possibly very well, at least not at
> first. =A0It also cannot be inverted. =A0Therefore, in estimating x from
> y, one needs to adjust parameters (in the more colloquial sense)
> during a process that is vaguely like inversion of A, and use this to
> find a function that operates on x to produce the known image result.
> This is likely an iterative process, comparing the results ...
>
> read more =BB- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

You have the gist of it, but for my purposes, image enlargement, A is
gestimated and that is good enough.  My 1D example used a box kernel.
It turns out that the 2D box kernel is sufficiently accurate to model
the Sigma SD14 and DP1 pixel sensors.  I think there are square
adjacent microlenses that account for this behavior.  As far as I
know, I am the only one to provide a large variety of kernels for
image enlargement (as provided in my commercial software, SAR Image
Processor).  It makes a visual difference when you assume the wrong
kernel, but it is not catastrophic as in the case pure deconvolution
(without decimation).
 




 65 Posts in Topic:
Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-17 10:54:52 
Re: Accurate edge detection?
"Science.Medical.Ima  2008-07-17 13:14:37 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-07-18 09:19:33 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-18 13:45:11 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-18 19:14:32 
Re: Accurate edge detection?
"Science.Medical.Ima  2008-07-18 22:39:53 
Re: Accurate edge detection?
"aruzinsky" <  2008-07-19 09:44:20 
Re: Accurate edge detection?
"Science.Medical.Ima  2008-07-20 13:24:34 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-07-20 16:24:05 
Re: Accurate edge detection?
Martin Brown <|||newsp  2008-07-23 10:16:36 
Re: Accurate edge detection?
"Science.Medical.Ima  2008-07-21 11:13:48 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-07-22 02:19:28 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-22 07:04:38 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-07-22 08:59:01 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-07-22 15:02:34 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-07-23 07:57:04 
Re: Accurate edge detection?
Martin Brown <|||newsp  2008-07-24 10:43:19 
Re: Accurate edge detection?
Steve Eddins <Steve.Ed  2008-07-24 09:02:55 
Re: Accurate edge detection?
illywhacker <illywacke  2008-07-23 09:01:25 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-23 13:48:12 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-23 13:50:03 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-23 13:52:10 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-23 14:12:49 
Re: Accurate edge detection?
"Science.Medical.Ima  2008-07-23 17:56:43 
Re: Accurate edge detection?
"Science.Medical.Ima  2008-07-23 18:02:10 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-07-23 21:11:27 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-23 21:17:35 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-07-24 08:27:48 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-07-24 09:55:05 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-24 14:04:53 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-07-25 08:00:31 
Re: Accurate edge detection?
illywhacker <illywacke  2008-07-25 11:15:05 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-07-26 12:20:25 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-07-26 14:55:02 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-07-26 23:39:28 
Re: Accurate edge detection?
illywhacker <illywacke  2008-07-29 01:24:14 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-07-29 02:55:07 
Re: Accurate edge detection?
illywhacker <illywacke  2008-07-29 05:18:37 
Re: Accurate edge detection?
illywhacker <illywacke  2008-07-29 05:22:34 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-07-30 00:35:47 
Re: Accurate edge detection?
illywhacker <illywacke  2008-07-30 06:44:56 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-07-30 12:39:46 
Re: Accurate edge detection?
illywhacker <illywacke  2008-07-31 09:19:43 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-07-31 16:51:58 
Re: Accurate edge detection?
illywhacker <illywacke  2008-07-31 22:48:34 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-08-01 01:41:06 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-08-01 09:22:37 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-08-02 01:32:09 
Re: Accurate edge detection?
illywhacker <illywacke  2008-08-02 09:37:47 
Re: Accurate edge detection?
illywhacker <illywacke  2008-08-02 09:39:37 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-08-02 09:57:08 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-08-02 10:20:40 
Re: Accurate edge detection?
illywhacker <illywacke  2008-08-02 10:25:25 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-08-02 11:45:27 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-08-02 12:21:56 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-08-02 12:42:33 
Re: Accurate edge detection?
illywhacker <illywacke  2008-08-02 14:18:54 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-08-03 10:25:11 
Re: Accurate edge detection?
illywhacker <illywacke  2008-08-03 10:30:51 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-08-03 13:27:21 
Re: Accurate edge detection?
sluster@[EMAIL PROTECTED]  2008-08-04 08:45:06 
Re: Accurate edge detection?
aruzinsky <aruzinsky@[  2008-08-04 10:06:59 
Re: Accurate edge detection?
Andrew_M <mats@[EMAIL   2008-08-04 13:29:21 
Re: Accurate edge detection?
illywhacker <illywacke  2008-08-13 09:51:30 
Re: Accurate edge detection?
illywhacker <illywacke  2008-08-13 10:02:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Nov 20 3:44:27 CST 2008.