Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we generate "foveated Image" in Mathematica

"Foveated imaging is a digital image processing technique in which the image resolution, or amount of detail, varies across the image according to one or more "fixation points." A fixation point indicates the highest resolution region of the image and corresponds to the center of the eye's retina, the fovea."

enter image description here

I want to use such image to illustrate humans visual acuity, The bellow diagram shows the relative acuity of the left human eye (horizontal section) in degrees from the fovea (Wikipedia) :

enter image description here

Is there a way to create a foveated image in Mathematica using its image processing capabilities ?

like image 214
500 Avatar asked Sep 12 '11 18:09

500


1 Answers

Something along the following lines may work for you. The filtering details should be adjusted to your tastes.

lena = ExampleData[{"TestImage", "Lena"}]

lena

ImageDimensions[lena]

==> {512, 512}

mask = DensityPlot[-Exp[-(x^2 + y^2)/5], {x, -4, 4}, {y, -4, 4}, 
                    Axes -> None, Frame -> None, Method -> {"ShrinkWrap" -> True}, 
                    ColorFunction -> GrayLevel, ImageSize -> 512]

mask

Show[ImageFilter[Mean[Flatten[#]] &, lena, 20, Masking -> mask], ImageSize -> 512]

enter image description here

like image 155
Sjoerd C. de Vries Avatar answered Oct 25 '22 16:10

Sjoerd C. de Vries