Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Optics

Hey,
Is LabVIEW can do simulation of thin lenses? I think about some project  of this kind of simulation. Based on the equation of the lens (1 / f) = (1 / x) + (1 / s), where f- focal length of the lens, the x-distance from the object lens, y-image distance from the lens.
This would rely on the fact that the user loads image, the image of the disk and then user type these parameters in the above equation, the user would enter any values of this parameters. I would like, that output data was the image distance from the lens, and that the user may change this distance noticing the change of sharpness, on the loaded image. It is fun like  magnifying glass, I have a picture, the program calculates the distance of image in which it is sharp based on of parameters that the user typed (focal length, object distance from the lens). Then the user would be able to enter any image distance from the lens noting changing its sharpness
Can I do this in labVIEW? Thanks for  help 🙂
0 Kudos
Message 1 of 4
(3,673 Views)
yes it is possible what you want to do is called Passive Autofocus and it is based on two method 1_Phase detection 2_Contrast detection
( in new some article they use other methods too)
but before start regard that
the equation that you mention is come from some approximation and it is not exact
value that you want. but it is good point to start search around it to find best value just by checking best answer of your algorithm( one of two method that I mention)
to find best answer
this is what Autofocus camera do. if you attention carefully you will be see that the lens change for several time around the one value and then become fix
0 Kudos
Message 2 of 4
(3,659 Views)

Thank for answer, for sure i will works. But now I have another solution of this. I will use IMAQ low pass filter beacuse I read it's works sht like blurring. But i have problem with error invalid image type.

0 Kudos
Message 3 of 4
(3,647 Views)

it was better to ask this question in different topic because any body come into this post just try to find answer to optic and also search for answer that you accept as solution and cudos it 
so he will not know about the problem you have in your second question and if you had such question  too he will make new topic 
this mean duplicate data for nothing 
so it is better to create new topic for your new question 
but i will answer you here too
first using low pass filter is algorithmic method for increasing detail visuality to see in picture and it is not exactly what focusing of optic do , is  make more details not 
also error is for RGB
see this 
thiss.jpg

0 Kudos
Message 4 of 4
(3,633 Views)