How to make intensity attenuated image or defocused image
Show older comments
when an image is imaged through a lens, if the screen is on the imaging point then focused image would be shown. But the screen is on the wrong distance then blurred image should be shown. I want a know how to make this situation respect to the distance between the lens and the screen. Actually to make focused image is easy cause it can be solved just pixel mapping but I want to know how to make blurred image when it is defocused. Moreover when two images, which are located different location from a lens, are imaged through a lens then one image is focused and the other is defocused on the fixed screen position. (the pixel on the original image will be magnified respect to the magnification of the lens. I can handel the magnification thing.)
Accepted Answer
More Answers (2)
Bjorn Gustavsson
on 11 Dec 2011
0 votes
If you want to do real optical ray-tracing through the imaging lens, there are a couple of submissions in the file exchange:
http://www.mathworks.co.uk/matlabcentral/fileexchange/27412-opticalbench, http://www.mathworks.co.uk/matlabcentral/fileexchange/21256-spectral-filtering-for-optics
Otherwise you might get away with simply estimating the spot-size as a function of screen displacement from the ideal focal distance, and then simply convolve your image with a 2-D low-pass filter with the corresponding point-spread-size.
HTH
Image Analyst
on 11 Dec 2011
You need to convolve your perfectly focused image with the point spread function. You can do the optical math to figure it out exactly, or you can just guess.
blurredImage = conv2(focusedImage, psf);
Categories
Find more on Labeling, Segmentation, and Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!