我需要创建一个特定的Gabor模式的图片,具有不同的对比度水平-从0%到100%。
我知道Matlab中有一个"Gabor“函数,但我没有找到定义Gabor对比度的方法。
我知道还有一个在屏幕上创建Gabor纹理的PsychToolbox函数( screen ('DrawTexture',windowPtr,gaborid...) ),但我不需要在屏幕上显示Gabor,我需要保存位图图片,并且我不知道如何捕获正在运行的PsychToolbox屏幕上显示的图片(所以捕获屏幕并保存它的函数\代码也会很受欢迎)。
谢谢!
精灵
发布于 2015-12-23 06:41:00
% Create the Gabor filter
F = gabor(20, 45);
F = real(F.SpatialKernel);
% Save the contrast-adjusted images
for contrast = linspace(0, 1, 5)
imwrite(((F * contrast) + 1) * 0.5, sprintf('gabor_%g.png', contrast));
endhttps://stackoverflow.com/questions/34408324
复制相似问题