Breaking

Wednesday, January 8, 2020

Intro to Fourier Optics and the 4F correlator--- make money online

Intro to Fourier Optics and the 4F correlator--- make money online
hey everyone recently someone at work
said that plain old lenses actually take
the Fourier transform of the image that

you put into them so at first it seems
pretty weird how does a plain old piece
of glass like this perform a complex
mathematical operation such as a Fourier
transform so I looked into it and let me
show you what I found out most engineers
are probably more familiar with Fourier
transforms as they apply to temporal
waveforms so for example if you're
looking at a sine wave on your
oscilloscope you might use the FFT
function to see what it looks like in
the frequency domain and you'll see for
a sine wave you'll see a nice spike at
the fundamental and for a square wave
you'll see all the harmonics and for a
real-world noisy waveform you'll see the
noise in between all the fundamentals
and harmonics there in cases like these
we aren't really looking at phase
information so this Fourier transform is
only the magnitude so if you shifted
this wave over a little bit you would
have the same exact output here because
this is not showing us any phase
information it's just the magnitude of
the component waves that that are needed
to create this the same concept can be
applied to things in the spatial domain
so let's say we had an image that looks
like this it's basically a sine wave of
intensity across the x axis so every
scanline is the same and they all have
this sort of intensity pattern so if we
were to it's possible to use the same
mathematics to apply a Fourier transform
to this so if we do that what you end up
with is an output image with a dot here
and a dot here so what's happening is is
the x axis is showing us the frequencies
just like in the first plot here is
showing us a spike where this
fundamental frequency lives and it's
it's doubled across the y axis because
that's how the math works out there is
an excellent tutorial that I'll put a
link to in the description that
describes this in much more detail and
does a really good job so check that out
if you're interested in image trance
forming using Fourier transforms
similarly if we were to take the Fourier
transform of this image we would have
the fundamental being really bright two
little dots there and then a slight
decreasing in intensity more and more
dots going off the x-axis and so this is
again the same as this the you have
decreasing intensities of the harmonics
and that creates the square wave so this
works in the other axis too if we were
to rotate this 90 degrees and we had a
square wave in the Y direction then we
would just have the pattern in the Y
direction here so every point on this
two-dimensional plane represents a
spatial frequency in the original image
if you take the Fourier transform of a
normal-looking picture you know a
picture a photograph of a house or
whatever you'll end up with something
that looks like this there'll be a
really really bright spot at the center
and then there's just kind of a whole
bunch of random looking noise around the
outside and the reason for that is that
pictures are very complex spatially and
so if you think about all the
frequencies you'd have to add together
all the different spatial frequencies to
come up with something that looks like a
real photo you'd realize how much
information is actually in the amplitude
plot and again this does not include
phase information just like talking
about over here
we're only discussing the frequency
components so if you take the Fourier
transform of this image and only look at
the magnitude plot you actually cannot
reconstruct the image fully because only
only have the frequency information one
of the interesting side effects of
having only frequency information in the
amplitude plot is that the location of
the feature in the image doesn't matter
so definitely check out that tutorial
but basically taking the FFT and looking
at only the magnitude the frequency
output an input image looking like this
would give exactly the same output as an
image looking like this because the
feature is the same has the same
dimensions but it's at a different
location in the image so this will
become important later ok so now that we
have a big
the idea of what a fourier transform is
in an image how in the world does a
plain piece of glass actually make it
happen there's a few important catches
that I ran into so if you're going to
try this yourself definitely check this
out if you search around on the internet
you'll you'll quickly run into something
called a 4f correlator which is sort of
the quintessential fourier optics device
and this does work I'll show you later I
actually did get some results out of it
but there's a lot of caches
so saying oh well lens takes the Fourier
transform is true but that you can't
really make use of it except in some
very limited cases so one problem is
that you get the phase information out
as well as the amplitude magnet
information so it's in that tutorial
we'll see that the phase images that you
get out of a Fourier transform are
really messy and it makes it such that
you can't really extract anything
meaningful out of it because it's just
so wild I mean you can't I mean
mathematically you can do things with it
but if you just sort of look at it on a
screen it doesn't really tell you
anything
so the 4f correlator is set up to only
show amplitude information and it does
this by using a laser which is a
coherent light source so let me show you
how it's set up
I use the helium neon laser and then
hot-glued a microscope objective to the
front of it and looked at a screen while
I was setting it up just to get it in
exactly the right spot and then you you
send the output of that through a
pinhole now the idea this is called a
spatial filter like if you go online and
search for this stuff they'll be talking
about spatial filters but really all
that is it's just a pinhole and it's
situated such that it's at the focal
point of the microscope objective
there's a chart that shows the optimum
pinhole size for a given microscope
objective and input beam and I which I
didn't have
Edmund sent I actually had to get down
to about 5 or 10 microns but I don't
have a hole that small I did have a 30
micron aperture that I used with my cell
you can see the effect of the pinhole
had without it there's quite a lot of
spatial noise in the beam it's just not
very clean and
with the pinhole we have a nice smooth
Gaussian distribution out there which
just means that the beam is bright at
the center and has a nice smooth taper
out to the edges so it's really just an
ideal sort of source of light next this
first lens is used just to collimate the
beam so the light rays are coming in at
an angle and are hopefully coming out
straight and I tested this pretty simply
just by using a pair of calipers and
making a couple marks on a projection
screen and then setting up the
projection screen very far away and then
holding the calipers in the beam out
here so if the projection if there were
no optics in here and I had the
projection screen way out here and I put
the calipers here and knew that the
distance was the same on the screen as
between the caliper jaws I could move
this around a bit until it was
collimated because we know that the
light is going perfectly straight the
distance between the jaws would be the
same as the distance marked on the
screen this distance is not too
important in the system it's because the
light is collimated the rest of it is
really just two lenses in a projection
screen and for most of the work that I
was doing I didn't even really need this
part you can put a screen here too so
what happens is you put your your input
image here this is just a plain old lens
F is the focal length of the lens at
this plane in space you're supposed to
get the Fourier transform which you do
but I'll talk about that in a minute and
then another F and other focal lengths
there's another lens and in another
focal length there's the output screen
so this is an image plane this is an
image plane and this is the Fourier
image plane since we're dealing with
monochromatic light from the laser you
can't really just put a photograph here
unfortunately the image has to be a
clear thing that just blocks out light
where you don't want it and so I got a
transparency just printed some stuff on
it I also used this because this is
actually quite opaque and it has nice
sharp edges on there this is just a lid
to a
box of optics I also tried things like
combs like this I also tried want one of
the best objects I tried was this very
fine copper mesh now this is sort of
cheating because you can actually see
the diffraction pattern just looking
through this light source but anyway
I'll talk about some of the resulting
images they got in a minute so here's
how this thing works
if you had nothing in the image plane
let's just say it was a clear shot from
this collimating optic into this first
optic here all the photons are going at
0 degrees let's just say all parallel
and every photon that goes into this
lens it should be focused down to
exactly the same point so if you put a
screen here with nothing in the between
these two you'll get one really really
sharp bright point right at the center
now if we put something in the image
plane like let's say a letter A where
the light hits the edge of this pattern
there will be some diffraction and the
diffraction will cause the light to
slightly diverge so instead of going
straight out where the light hits an
edge of a feature is going to be a
slight divergence in angle and that
divergence and angle is going to show up
as something not on the spot here so any
sort of a interference that you put here
is going to show up as a deviation from
that from that focal point so in essence
all this lens is doing is focusing down
the diffraction pattern from here onto a
screen it's kind of annoying it's almost
a little frustrating to get down to it
at this simple level like for example if
you go to the Wikipedia article on Fry
optics or 4f correlator you know it's
incredibly complex I mean there's just
tons of equations and very little
explanatory text that would actually
make this you know understandable but
really all that's happening is you're
just focusing a diffraction pattern
there's a couple of really cool tricks
that you can do with this for
F correlator once it's working
unfortunately better than what I was
able to get working tonight
one of them is that you can do some
primitive image processing with this so
for example if you put your input image
here and you put some kind of a filter
here the output image what will be
affected by the filter that you put here
so if we put a filter that blocked out
everything except the center of the of
the image let's say everything outside
the circle is blocked and everything in
the middle was okay then what we would
have is low frequency components only
getting through so remember what this
means the farther are you a wave the
farther away you are from the center the
higher the frequency so this means no
high spatial frequencies get through so
it's sort of a it's a blurring filter
basically another cool thing is that you
can put an image here and then put a the
Fourier transform of your of your target
image here so let's say you're searching
for a feature inside an image what you
can do is put the Fourier transform of
your desired image here and then kind of
sort through a bunch of photographs like
well not photographs unfortunately they
have to be you know clear black on clear
you put that here the output will change
when when there's a match between your
your target and your source remember
also that since we're in the frequency
domain it doesn't really matter where in
the image this feature is the rotation
matters so what you have to do is
actually rotate around your your target
filter and keep monitoring the output to
see if there's a match there scale also
matters so I'm not quite sure how that's
handled but you can do a really simple
kind of image processing image search
stuff in optics without any computers
are digitizing or anything so that's
pretty cool anyway so I think basically
my problem is that at the lenses I have
just aren't quite good enough to get a
decent image I got some some halfway
decent results with the copper mesh and
and and sort of saw something with with
the
the black on clear images but it's going
to need more work so I'll do a follow-up
video sometime and let you know if I get
anything decent okay see you next time

byeTop Paid Keyword :  earn cash online, google make money from home, earn money online without investment by clicking ads, free earn money website, online money making jobs, earn money online without investment by typing, online work for money, best online earning sites, make money online with google, online earning websites, money making websites, online earning websites for students, invest online and earn money, best online money making, online money income, view ads and earn money without investment, earn money online by clicking, online money income site, money earning sites, online earning sites, best website to earn money, free money earning sites,

No comments: