function test_image = test_image_noise_response_bw_0(nx, ny) % Compute ... % TEST_IMAGE_NOISE_RESPONSE_BW_0(NX, NY) returns ... % Precompute % often used constants. coriginx = 1; coriginy = 1; cxscale = 1/nx; cyscale = 1/ny; % Coarse move along the X-axis. for cxindex = 1:1:nx % Compute the coarse position % along the X-axis. cxposition = cxscale*(cxindex - coriginx); % Coarse move along the Y-axis. for cyindex = 1:1:ny % Compute the coarse position % along the Y-axis. cyposition = cyscale*(cyindex - coriginy); % Compute the pattern. test_image(cyindex, cxindex) = (exp(cxposition) - 1)/(exp(1) - 1); end end % Compute the pattern. v = var(test_image(:)); % test_image(1+floor(0.000*ny):floor(0.125*ny), :) = imnoise(test_image(1+floor(0.000*ny):floor(0.125*ny), :), 'gaussian', 0, v/10^(27/10)); test_image(1+floor(0.125*ny), :) = 0.0; test_image(1+floor(0.125*ny):floor(0.250*ny), :) = imnoise(test_image(1+floor(0.125*ny):floor(0.250*ny), :), 'gaussian', 0, v/10^(24/10)); test_image(1+floor(0.250*ny), :) = 0.0; test_image(1+floor(0.250*ny):floor(0.375*ny), :) = imnoise(test_image(1+floor(0.250*ny):floor(0.375*ny), :), 'gaussian', 0, v/10^(21/10)); test_image(1+floor(0.375*ny), :) = 0.0; test_image(1+floor(0.375*ny):floor(0.500*ny), :) = imnoise(test_image(1+floor(0.375*ny):floor(0.500*ny), :), 'gaussian', 0, v/10^(18/10)); test_image(1+floor(0.500*ny), :) = 0.0; test_image(1+floor(0.500*ny):floor(0.625*ny), :) = imnoise(test_image(1+floor(0.500*ny):floor(0.625*ny), :), 'gaussian', 0, v/10^(15/10)); test_image(1+floor(0.625*ny), :) = 0.0; test_image(1+floor(0.625*ny):floor(0.750*ny), :) = imnoise(test_image(1+floor(0.625*ny):floor(0.750*ny), :), 'gaussian', 0, v/10^(12/10)); test_image(1+floor(0.750*ny), :) = 0.0; test_image(1+floor(0.750*ny):floor(0.875*ny), :) = imnoise(test_image(1+floor(0.750*ny):floor(0.875*ny), :), 'gaussian', 0, v/10^( 9/10)); test_image(1+floor(0.875*ny), :) = 0.0; test_image(1+floor(0.875*ny):floor(1.000*ny), :) = imnoise(test_image(1+floor(0.875*ny):floor(1.000*ny), :), 'gaussian', 0, v/10^( 6/10)); end