www.GetXFactor.com

Leading Technology, Science,
Agriculture News and information


Part of the Identityscape.com network...

getxfactor.com jmoodmusic.com smartbusinesschoices.com mintdepot.com lowfaresalways.com evangelicalview.com shoppingpodder.com soproudlywehail.com webnews.ws currenthumor.com

 

 

Accurate edge detection?
Goto page Previous  1, 2, 3
   Science and Technology news... Forum Index -> Image Processing Forum  
View previous topic :: View next topic  
Author Message
aruzinsky
Guest






PostPosted: Fri Jul 25, 2008 3:00 pm    Post subject: Re: Accurate edge detection? Reply with quote

On Jul 24, 3:04 pm, slus...@lw4u.com wrote:
[quote]On Jul 24, 12:55 pm, aruzinsky <aruzin...@general-cathexis.com> wrote:





On Jul 23, 2:48 pm, slus...@lw4u.com wrote:

On Jul 22, 11:59 am, aruzinsky <aruzin...@general-cathexis.com> wrote:

On Jul 22, 8:04 am, slus...@lw4u.com wrote:

Thank you for your interest and offer to review some sample images.
Unfortunately, our concern is not on the software or algorithmic side,
but on the optical side.  As 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.  What is wrong with you?

I also mentioned that I originally posted to sci.optics, then added
sci.image.processing because I thought the folks here might be more
aware of relavent references.  The (apparently) commonly held belief
that the maximum slope of the edge image, or the midpoint between the
maximum and minimum grey level values of the edge image corresponds to
the true edge location seems unmotivated or unsupported to me, even
though it "feels" like common sense.  

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.

 We
are continuing our own investigation, but I have to believe that
someone has already done this at some time and published their
results.  I>d love to find out that our own efforts at inventing the
wheel are unecessary. :-)

I already gave you a reference to a relatively simple algorithm that
might do better than 0.2 pixels.   It would be foolish not to try it.

Hmm. I appear to have offended you.  If it was because I had not yet
acknowledged your reply to my query, I apologize.  I 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.  In 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 Brits
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.  One also sees that "past" the edge, the light intensity
climbs, reaches a peak, then oscillates in a decaying fashion,
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 slope
(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.  Thus, edge finding techniques that depend
in some fashion 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.  The 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.  My 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.  It>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.  I>m cutting and pasting here a brief description of our
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.  We 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.  The direction of motion was perpendicular to
the lens optical axis to within 0.25 degrees.  We 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.  What we found consistently through different positions
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.  The 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 responsivity
could be the culprit.  While 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 = [ 0 0 0 1 1 1 1 1]T

A > > [
1/2 1/2  0    0   0    0   0   0
0     0  1/2 1/2  0    0   0   0
0     0   0    0  1/2 1/2  0   0
0     0   0    0    0   0  1/2 1/2
]

So generally speaking, A represents the PSF of the lens, Fresnel
diffraction at the edge, lens aberrations, etc.  Essentially 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.  You can see A is undetermined and not invertible.

Decimation? I can see I>ll need to pull out my old linear algebra
text.  Or is this something more specific to image processing?







Your observed values would be

y = Ax = [ 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' = [ yT 0T ]T

A' = [AT   w*BT]T

w is scalar weight

B > > [
1 -1 0  ... 0 0
0  1 -1 ... 0 0
...
0 0 0 ...  1 -1
]

Now, A' is overdetermined

solve

min || y' - A' x' ||
 x'

||.|| is a norm or possibly a function similar to a norm but not
necessarily convex.  L2 norm is not recommended because it will cause
oscillations.  L1 norm recommended.  All of this has a statistical
interpretation which I won>t get into for simplicity.

Your A will have to incorporate a different PSF for diffraction
thingy.- Hide quoted text -

- Show quoted text -

Yep, I definitely need to brush up on my linear algebra.  But 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.  It also cannot be inverted.  Therefore, 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 »- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
[/quote]
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).
Back to top
illywhacker
Guest






PostPosted: Fri Jul 25, 2008 6:15 pm    Post subject: Re: Accurate edge detection? Reply with quote

On Jul 23, 11:12 pm, slus...@lw4u.com wrote:
[quote]On Jul 23, 12:01 pm, illywhacker <illywac...@gmail.com> wrote:


On Jul 17, 7:54 pm, slus...@lw4u.com wrote:

I originally posted the following on the sci.optics newsgroup because
it>s more of an optical query. Nevertheless, the folks here may be
more familiar with the available references and research that>s been
done. Please forgive my statement of some things that will no doubt be
obvious to many here. (BTW: I also have a description of the
experiments we>ve performed for anyone interested.)

===================================================
In the image processing community, there are discussions of edge
detection techniques. For a simple case, imagine an opaque knife
edge
with a uniform back light behind it. Further imagine there is a lens
that images the knife edge onto a pixel detector of a camera.

In general, the transition from dark to light at the detector is some
smoothly varying function, not a sharp jump. Diffraction, of course,
limits the ultimate sharpness of the edge image -- diffraction at the
edge itself, and diffraction at the aperture of the lens.
Aberrations
of the lens will also contribute to this edge smoothing.

The digital image as presented *by* the camera may take only a pixel
or two to transition from dark to light, or it might take many more.
Regardless, digitization and pixel size and other factors such as MTF
of the electronics themselves serve to mask the true edge function

A very common starting point in the discussions and papers about edge
detection techniques is the assumption that the point at which the
slope of the edge is maximum represents the "true" edge position.
From then on, the various edge detection algorithms usually present
different methods of more accurately calculating this maximum slope,
especially in the face of optical and electronic noise, etc.

Nevertheless, it seems to me that the assumption that the maximum
slope represents the true edge is at least unmotivated (no matter how
"common sense" it feels) if not wrong. I have in mind the pictures
of
edge diffraction as produced by using Cornu>s spiral. The location
of
the true edge, relative to the average intensity of the light area
(smoothing out the diffraction oscillations), looks to be at a
position of increasing slope as you go from dark to light, but NOT
maximum. Furthermore, the edge is less than the 50% point of peak
light intensity. (Another assumption sometimes made in image
processing is that the 50% point of the dark to light transistion
represents the edge.)

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? We have done a couple of bench
tests to suggest under the experimental conditions that the best edge
location is about 41% to 46% of the range of the dark to light
transition. We haven>t yet completed our analysis regarding how this
compares to the peak slope.

This problem has to have been tackled successfully before, but so far
I>ve not found any good sources that address the optical issue, only
software techniques.

Thanks!

Spencer

Actually for a straight knife edge, it is pretty easy to see that for
any translation-invariant linear operator that is reflection-invariant
in the direction along the edge (which, as Aruzinsky points out,
covers a lot of optical ground):

1) the slope is an extremum at the edge position (in the continuum);
and

2) the intensity at the edge position is the average of the intensity
at the extremes (of course, this is not a local measurement).

The basic equation is as follows. Let J be the observed image (in the
continuum); let the knife edge be at point x0; let I1 and I2 be the
intensities for x much less than x0 and x much greater than x0; let
the kernel of the linear operator be G(x, y) (remember it is
translation invariant). Let

H(x) = \int dy G(x, y)

and

L(x) = \int_{-\infty}^{x} dx' H(x') .

Obviously L(-\infty) = 0. Suppose that L(\infty) = 1 (this is just
normalization). Then

J(x) = I1 + (I2 - I1) L(x - x0) .

Note that J does not depend on y, as I did not. Since L(x) = L(-x) by
hypothesis, we have that L(0) = 1/2 and that L''(0) = 0.

illywhacker;- Hide quoted text -

- Show quoted text -

Well, this may take some thinking. Although I>ve worked in machine
vision since 1985, my degree is in physics and my area of expertise is
optics and lighting, not image processing.
[/quote]
What I just described is physics. My PhD was in physics. The simplest
model of the diffractive effect of an edge (a knife edge) and the
optical system is a linear operator. Any linear operator with the
properties that I described (note that edge effects are not being
taken into account) will generate the type of image I described.

[quote]probably true, but doesn>t this still simply assert that the maximum
slope/gradient of the real physical edge image corresponds to the true
edge location?
[/quote]
It is not an assertion; it is a proof, under certain assumptions.
Anyway, the answer to your question is no, since the image of a knife
edge may not be a monotonically changing image (there may be
diffraction fringes, for example). But the edge will lie at an
extremum. If the image is monotonic, then yes, the edge position is
the point of maximum gradient under the above assumptions (this does
not take into account the discretization involved in the image). It
is also a/the point where the image intensity is the average of its
values at +/- \infty.

The optics you can find in any textbook: you do not need research
articles. But the main point is that you are dealing not with an
optics problem (or rather, the optics problem is relatively trivial),
but with an inference problem. You want to infer the position of the
edge from the image that you have. This is not simply a question of
inverting an equation because information has been lost. So although
the image may be determined given the edge position, the edge
position might not be determined given the image without further
knowledge, i.e. given only the image, there are multiple solutions,
which is what others have been telling you. This applies in
particular if the edge geometry is unknown, or if there is noise in
the system, but in any case the image discretization pretty much
ensures that high frequency detail (like precise positions) is lost
and must be reconstructed.

So your problem is one of image processing (which is simply the study
of inference problems like these), except that you want to be more
precise about the optics part. If you know all the relevant
parameters, your life will be much easier, otherwise you will have to
infer these too.

illywhacker;
Back to top
Guest







PostPosted: Sat Jul 26, 2008 7:20 pm    Post subject: Re: Accurate edge detection? Reply with quote

On Jul 25, 2:15 pm, illywhacker <illywac...@gmail.com> wrote:
[quote]On Jul 23, 11:12 pm, slus...@lw4u.com wrote:





On Jul 23, 12:01 pm, illywhacker <illywac...@gmail.com> wrote:

On Jul 17, 7:54 pm, slus...@lw4u.com wrote:

I originally posted the following on the sci.optics newsgroup because
it>s more of an optical query.  Nevertheless, the folks here may be
more familiar with the available references and research that>s been
done. Please forgive my statement of some things that will no doubt be
obvious to many here.  (BTW: I also have a description of the
experiments we>ve performed for anyone interested.)

==================================================> > > > In the image processing community, there are discussions of edge
detection techniques.  For a simple case, imagine an opaque knife
edge
with a uniform back light behind it. Further imagine there is a lens
that images the knife edge onto a pixel detector of a camera.

In general, the transition from dark to light at the detector is some
smoothly varying function, not a sharp jump.  Diffraction, of course,
limits the ultimate sharpness of the edge image -- diffraction at the
edge itself, and diffraction at the aperture of the lens.
Aberrations
of the lens will also contribute to this edge smoothing.

The digital image as presented *by* the camera may take only a pixel
or two to transition from dark to light, or it might take many more..
Regardless, digitization and pixel size and other factors such as MTF
of the electronics themselves serve to mask the true edge function

A very common starting point in the discussions and papers about edge
detection techniques is the assumption that the point at which the
slope of the edge is maximum represents the "true" edge position.
From then on, the various edge detection algorithms usually present
different methods of more accurately calculating this maximum slope,
especially in the face of optical and electronic noise, etc.

Nevertheless, it seems to me that the assumption that the maximum
slope represents the true edge is at least unmotivated (no matter how
"common sense" it feels) if not wrong.  I have in mind the pictures
of
edge diffraction as produced by using Cornu>s spiral.  The location
of
the true edge, relative to the average intensity of the light area
(smoothing out the diffraction oscillations), looks to be at a
position of increasing slope as you go from dark to light, but NOT
maximum.  Furthermore, the edge is less than the 50% point of peak
light intensity.  (Another assumption sometimes made in image
processing is that the 50% point of the dark to light transistion
represents the edge.)

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?  We have done a couple of bench
tests to suggest under the experimental conditions that the best edge
location is about 41% to 46% of the range of the dark to light
transition.  We haven>t yet completed our analysis regarding how this
compares to the peak slope.

This problem has to have been tackled successfully before, but so far
I>ve not found any good sources that address the optical issue, only
software techniques.

Thanks!

Spencer

Actually for a straight knife edge, it is pretty easy to see that for
any translation-invariant linear operator that is reflection-invariant
in the direction along the edge (which, as Aruzinsky points out,
covers a lot of optical ground):

1) the slope is an extremum at the edge position (in the continuum);
and

2) the intensity at the edge position is the average of the intensity
at the extremes (of course, this is not a local measurement).

The basic equation is as follows. Let J be the observed image (in the
continuum); let the knife edge be at point x0; let I1 and I2 be the
intensities for x much less than x0 and x much greater than x0; let
the kernel of the linear operator be G(x, y) (remember it is
translation invariant). Let

H(x) = \int dy G(x, y)

and

L(x) = \int_{-\infty}^{x} dx' H(x') .

Obviously L(-\infty) = 0. Suppose that L(\infty) = 1 (this is just
normalization). Then

J(x) = I1 + (I2 - I1) L(x - x0) .

Note that J does not depend on y, as I did not. Since L(x) = L(-x) by
hypothesis, we have that L(0) = 1/2 and that L''(0) = 0.

illywhacker;- Hide quoted text -

- Show quoted text -

Well, this may take some thinking. Although I>ve worked in machine
vision since 1985, my degree is in physics and my area of expertise is
optics and lighting, not image processing.

What I just described is physics. My PhD was in physics. The simplest
model of the diffractive effect of an edge (a knife edge) and the
optical system is a linear operator. Any linear operator with the
properties that I described (note that edge effects are not being
taken into account) will generate the type of image I described.

probably true, but doesn>t this still simply assert that the maximum
slope/gradient of the real physical edge image corresponds to the true
edge location?

It is not an assertion; it is a proof, under certain assumptions.
Anyway, the answer to your question is no, since the image of a knife
edge may not be a monotonically changing image (there may be
diffraction fringes, for example). But the edge will lie at an
extremum. If the image is monotonic, then yes, the edge position is
the point of maximum gradient under the above assumptions (this does
not take into account the discretization involved in the image). It
is also a/the point where the image intensity is the average of its
values at +/- \infty.

The optics you can find in any textbook: you do not need research
articles. But the main point is that you are dealing not with an
optics problem (or rather, the optics problem is relatively trivial),
but with an inference problem. You want to infer the position of the
edge from the image that you have. This is not simply a question of
inverting an equation because information has been lost. So although
the image may be determined given the edge position, the edge
position might not be determined given the image without further
knowledge, i.e. given only the image, there are multiple solutions,
which is what others have been telling you. This applies in
particular if the edge geometry is unknown, or if there is noise in
the system, but in any case the image discretization pretty much
ensures that high frequency detail (like precise positions) is lost
and must be reconstructed.

So your problem is one of image processing (which is simply the study
of inference problems like these), except that you want to be more
precise about the optics part. If you know all the relevant
parameters, your life will be much easier, otherwise you will have to
infer these too.

illywhacker;- Hide quoted text -

- Show quoted text -
[/quote]
You said: "If you know all the relevant
parameters, your life will be much easier, otherwise you will have to
infer these too."

Indeed! Thanks very much for your time and advice. The same to
everyone else who responded.

Spencer
Back to top
Andrew_M
Guest






PostPosted: Sat Jul 26, 2008 9:55 pm    Post subject: Re: Accurate edge detection? Reply with quote

[quote]probably true, but doesn>t this still simply assert that the maximum
slope/gradient of the real physical edge image corresponds to the true
edge location?

It is not an assertion; it is a proof, under certain assumptions.
[/quote]
Not true. Simple samples like Fraunghofer>s diffraction, have no such
a property. True edge location is a thing, what has a meaning only for
some sort of images. But, if you have a grayscale image, you may have
no such things as an edge at all. Unfocused photo, for example. But,
even for two color images, where edge position has of course sence,
its proper location depends on the whole image. Interferention and
diffraction, nothing to do. Therefore, it is not a local problem. The
only way to solve it is using knowledge of how the source inage is
transformed (this info may be calculated or measured, using some test
images with known structure) and which this sorce image could be
(smooth edges, for example, not a random set of colored dots), to find
such a source, what after transform looks like scanned image what one
has. To start with some rough approximation and, step by step,
iteration by iteration, morph it, trying to get something similar to
scanned one.
Back to top
Andrew_M
Guest






PostPosted: Sun Jul 27, 2008 6:39 am    Post subject: Re: Accurate edge detection? Reply with quote

I could you recommend look at couple of images, what I>ve just
created. The first image http://www.smartfills.com/Html/Images/diffr.jpg
is intended to show, how some test objects with simple geometry look
after diffraction. The second one http://www.smartfills.com/Html/Images/diffr1.jpg
is result of my attempt restore these objects. I added some noise to
the first image and tried to revert transform. Not very bad for 5 ours
at my comp (course, it could be done better). BTW, looking at the
first image, especially at triangle, it is getting quite clear that
there is no such thing as where actually true edge is. It cannot be
established using slopes steepness. But, on the other hand, more
advanced methods are able to obtain better results. If you really need
some assistance, do not hesitate contact me.
A.
Back to top
illywhacker
Guest






PostPosted: Tue Jul 29, 2008 8:24 am    Post subject: Re: Accurate edge detection? Reply with quote

On Jul 26, 9:20 pm, slus...@lw4u.com wrote:
[quote]On Jul 25, 2:15 pm,illywhacker<illywac...@gmail.com> wrote:
On Jul 23, 11:12 pm, slus...@lw4u.com wrote:
On Jul 23, 12:01 pm,illywhacker<illywac...@gmail.com> wrote:
On Jul 17, 7:54 pm, slus...@lw4u.com wrote:

You said: "If you know all the relevant
parameters, your life will be much easier, otherwise you will have to
infer these too."

Indeed! Thanks very much for your time and advice.
[/quote]
Dear Spencer,

I am afraid that the problem you seem to think is relatively trivial
is far
from being so. You have the air of someone who thinks they know more
than
the people they are talking to, but alas a little knowledge is a
dangerous
thing.

[quote]You said: "If you know all the relevant
parameters, your life will be much easier, otherwise you will have to
infer these too."

Indeed! Thanks very much for your time and advice.
[/quote]
You seem to find this flippant or amusing, but it is the heart of the
problem. How much information do you think you will need to predict
the
image using physics? First of all, you need to define 'edge' more
precisely. Then you need to know the geometry of the particular edge
you
are dealing with, which may not boil down to a mere 'position', you
need to
know the illumination, its spectral content, etc., and you need to
know the
properties of the camera. How much of this information are you
assuming you
know? Are you assuming a simplified toy example, or some conditions
related
to a particular type of experiment? Which approximations are you going
to
make? Not geometric optics, obviously, since you speak of diffraction.
Which of these parameters do you imagine will not affect the image
formed
by the edge?

If some of the parameters are unknown, then you will have to deal with
them
in addition to the edge 'position'. There are well-defined
mathematical
ways of attacking this problem with probability theory, apparently
unknown
to you. If you can get over the idea that you are talking to a bunch
of
hick image processors, then I will say more.

illywhacker;
Back to top
Andrew_M
Guest






PostPosted: Tue Jul 29, 2008 9:55 am    Post subject: Re: Accurate edge detection? Reply with quote

BTW, when I was working with restoring of diffracted images, I quickly
realized, that interferention is in fact nonlinear effect. You
actually measure only intensity of a vawe field, but sum of even two
vectors doesn>t meant, that lenght of a result will be equal to sum of
lenghts of components. This is why I cannot finally get rid of the
rest of diffracted image. Reverting non-linear ops is not such a
simple task and usually require sequence of iterations. I did them and
as a result got better (more contrast) result. I>m just about to put
it at http://www.smartfills.com/Html/Images/diffr3.jpg
.. In any event, interesting problem. I was surprised by myself, when I
got restored image. I thought, that such a quality is impossible to
get. But this is the nice sample of the fact, that complicate problems
cannot be solved, using simple methods. Each method must be adequate
to problem to be solved.
Back to top
illywhacker
Guest






PostPosted: Tue Jul 29, 2008 12:18 pm    Post subject: Re: Accurate edge detection? Reply with quote

On Jul 26, 11:55 pm, Andrew_M <m...@smartfills.com> wrote:
[quote]probably true, but doesn>t this still simply assert that the maximum
slope/gradient of the real physical edge image corresponds to the true
edge location?

It is not an assertion; it is a proof, under certain assumptions.

Not true. Simple samples like Fraunghofer>s diffraction, have no such
a property.
[/quote]
I was not talking about real images. I was talking about an idealized
mathematical situation, as I made clear. In this situation, it was a
theorem. Evidently theorems do not apply to real images or
electromagnetic fields since these are not mathematical entities.
There are simple approximations in which the overall effect of the
optics is roughly linear in the energy field, in particular when
interference is not an issue. As you correctly point out, however,
when there is diffraction, there is no linearity, although again, in a
simple approximation, the spatially varying part of the energy density
incident on the camera lens close to the edge position is a linear
function of the edge characteristic function.

[quote]True edge location is a thing, what has a meaning only for
some sort of images. But, if you have a grayscale image, you may have
no such things as an edge at all. Unfocused photo, for example.
[/quote]
I am well aware of the properties of images. Edge position refers to
edge position *in space*, not in the image, where it may be
arbitrarily defined. In general, the problem is well-posed as follows:
given the image, estimate the edge position *in space*. This still
assumes that the edge can be summarized by a single 'position'
parameter, but for a straight knife edge this is reasonable.

illywhacker;
Back to top
illywhacker
Guest






PostPosted: Tue Jul 29, 2008 12:22 pm    Post subject: Re: Accurate edge detection? Reply with quote

On Jul 29, 11:55 am, Andrew_M <m...@smartfills.com> wrote:
[quote]BTW, when I was working with restoring of diffracted images, I quickly
realized, that interferention is in fact nonlinear effect. You
actually measure only intensity of a vawe field, but sum of even two
vectors doesn>t meant, that lenght of a result will be equal to sum of
lenghts of components.
[/quote]
This is true.

[quote]But this is the nice sample of the fact, that complicate problems
cannot be solved, using simple methods. Each method must be adequate
to problem to be solved.
[/quote]
I agree. And this is a complicated problem. Although maybe you do not
have to deconvolve the whole image to estimate the edge position. If
you know you are dealing with a straight knife edge, it is a one-
dimensional problem if all other parameters are known.

illywhacker;
Back to top
Andrew_M
Guest






PostPosted: Wed Jul 30, 2008 7:35 am    Post subject: Re: Accurate edge detection? Reply with quote

illywhacker:
[quote]On Jul 29, 11:55�am, Andrew_M <m...@smartfills.com> wrote:
BTW, when I was working with restoring of diffracted images, I quickly
realized, that interferention is in fact nonlinear effect. You
actually measure only intensity of a vawe field, but sum of even two
vectors doesn>t meant, that lenght of a result will be equal to sum of
lenghts of components.

This is true.

But this is the nice sample of the fact, that complicate problems
cannot be solved, using simple methods. Each method must be adequate
to problem to be solved.

I agree. And this is a complicated problem. Although maybe you do not
have to deconvolve the whole image to estimate the edge position. If
you know you are dealing with a straight knife edge, it is a one-
dimensional problem if all other parameters are known.

illywhacker;
[/quote]
Due to the fact that Mr. Spencer didn>t explained in details what sort
of objects he is working with, I have a guess that «edge knife» is the
term what>s only purpose is to make further discussion simpler.
Probably he wants to get better resolution than his optics plus
scanner allow to get. This is possible sometimes for some sort of
objects, but with much more complicated methods than at what steepness
of a slope true edge is?. Really, when I had made my images, I found
one old book on computer application in optics research, where I found
description of a methods, likes what I actually used to restore images
after diffraction. At this book some research works are described, but
really old ones- made 30 years ago. But classic methods probably still
functional. Yeah, this is non-linear problem, as I wrote. I did right
things, as you may notice, trying to compare two images:
plight://www.smartfills.com/Html/Images/diffr1.jpg (the first
iteration) and http://www.smartfills.com/Html/Images/diffr3.jpg (the
eight iteration). After this iteration the source could be restored
using simple threshold. In any event,.contours was restored more than
accurately after the first iteration. Therefore, for two colors images
this method solve the problem completely. The only thing, what isn>t
clear, is why Mr. Spencer asks for advices and after it bravery
declines them all.
Back to top
illywhacker
Guest






PostPosted: Wed Jul 30, 2008 1:44 pm    Post subject: Re: Accurate edge detection? Reply with quote

On Jul 30, 9:35 am, Andrew_M <m...@smartfills.com> wrote:
[quote]
Due to the fact that Mr. Spencer didn>t explained in details what sort
of objects he is working with, I have a guess that «edge knife» is the
term what>s only purpose is to make further discussion simpler.
Probably he wants to get better resolution than his optics plus
scanner allow to get.
[/quote]
Perhaps, but that is up to him to say. He did not say he wanted to
achieve higher resolution. Rather, he asked a specific question about
optics. The knife edge is of course grossly oversimplified. The point
of the example was to illustrate some pertiment points, that is all.
This is the function of a 'toy model'. However, in some circumstances
(low edge curvature, particular type of edges) it might also be
useful.

[quote]things, as you may notice, trying to compare two images:
plight://www.smartfills.com/Html/Images/diffr1.jpg(the first
iteration) and  http://www.smartfills.com/Html/Images/diffr3.jpg(the
eight iteration). After this iteration the source could be restored
using simple threshold. In any event,.contours was restored more than
accurately after the first iteration.
[/quote]
Yes, very good, but I am not here to judge your efforts at image
restoration. Perhaps you have not seen recent research on this topic.

[quote]Therefore, for two colors images
this method solve the problem completely.
[/quote]
I took a look at your images. I would certainly not say the problem
was solved completely.

illywhacker;
Back to top
Andrew_M
Guest






PostPosted: Wed Jul 30, 2008 7:39 pm    Post subject: Re: Accurate edge detection? Reply with quote

[quote]I took a look at your images. I would certainly not say the problem
was solved completely.

illywhacker;
[/quote]
Yes and no. In fact, I>ve restored test images, obtained with the aid
of the known diffraction model. No aberration and so on. With real
images course there will be more problems. But for this case certanly
yes. It would be very simple to set an appropriate threshold and cut
all the rest of diffraction off, but I didn>t do it especially to show
restoration technique. I>ve just have restored some text instead of my
first set of objects ( http://www.smartfills.com/Html/Images/textdiffr.jpg
and http://www.smartfills.com/Html/Images/textrestr.jpg ) I do not
think that there is a way (and necessity) make it better.
Back to top
illywhacker
Guest






PostPosted: Thu Jul 31, 2008 4:19 pm    Post subject: Re: Accurate edge detection? Reply with quote

On Jul 30, 9:39 pm, Andrew_M <m...@smartfills.com> wrote:
[quote]I took a look at your images. I would certainly not say the problem
was solved completely.

illywhacker;

Yes and no. In fact, I>ve restored test images, obtained with the aid
of the known diffraction model. No aberration and so on. With real
images course there will be more problems.
[/quote]
This is a dramatic understatement.

[quote]It would be very simple to set an appropriate threshold and cut
all the rest of diffraction off, but I didn>t do it especially to show
restoration technique. I>ve just have restored some text instead of my
first set of objects (http://www.smartfills.com/Html/Images/textdiffr.jpg
andhttp://www.smartfills.com/Html/Images/textrestr.jpg) I do not
think that there is a way (and necessity) make it better.
[/quote]
Spoken like a true resarcher. Where is it published?

illywhacker;
Back to top
Andrew_M
Guest






PostPosted: Thu Jul 31, 2008 11:51 pm    Post subject: Re: Accurate edge detection? Reply with quote

[quote]It would be very simple to set an appropriate threshold and cut
all the rest of diffraction off, but I didn>t do it especially to show
restoration technique. I>ve just have restored some text instead of my
first set of objects (http://www.smartfills.com/Html/Images/textdiffr.jpg
andhttp://www.smartfills.com/Html/Images/textrestr.jpg) I do not
think that there is a way (and necessity) make it better.

Spoken like a true resarcher. Where is it published?

illywhacker;
[/quote]
In font of your eyes, only. The last sentence of your own caused my
strong desire to tell you some stories about researchers and why this
word sounds like mating grunt for me. But, this is obviously wrong
place for it. If you have an interest in technique what I>ve used to
revert irreversible transform, you>d better contact me directly. I
see, that all another boys lost interest in this discussion, and as
for me I unfortunately have some problems when I have to load each
time 600K of traffic what is a must to get the last message in this
topic. Nothing to do, I live in the backside of the civilized world
and my Net is limited to 15- rarely 20 Kbits (not kilobytes!) per sec.
I found this Google group three weeks ago and realized that this one
has some interest for me. I know both physic, math and programming-
all components what are a must to solve such sort of problems like
restoration of diffracted images. So I spent two days, playing with
algorithms. I tested three variants of how it could be done, and later
found my own old book on computers in image processing. At this book I
found description of one method, what I had tested and declined
finally. My variant works better, but not considerably better. The
only thing what I have discovered (and what was a real surprise for
me!) was that relatively simple methods can produce good results. I
mean, that what I used was the only linear algebra- no linear
programming.
mats(at)smartfills(dot)com
Back to top
illywhacker
Guest






PostPosted: Fri Aug 01, 2008 5:48 am    Post subject: Re: Accurate edge detection? Reply with quote

On Aug 1, 1:51 am, Andrew_M <m...@smartfills.com> wrote:
[quote]Spoken like a true resarcher. Where is it published?

In font of your eyes, only.
[/quote]
It was sarcasm.

[quote]The last sentence of your own caused my
strong desire to tell you some stories about researchers and why this
word sounds like mating grunt for me.
[/quote]
Go ahead. I am intrigued.

[quote]But, this is obviously wrong
place for it.
[/quote]
Not obviously. Have you read many of the posts here?

illywhacker;
Back to top
Display posts from previous:   
   Science and Technology news... Forum Index -> Image Processing Forum Goto page Previous  1, 2, 3  
Page 3 of 3
All times are GMT

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum