Can we generate “foveated Image” in Mathematica

后端 未结 3 1705
刺人心
刺人心 2020-12-28 08:32

\"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 po

3条回答
  •  失恋的感觉
    2020-12-28 09:02

    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

提交回复
热议问题