By the way, here how I solved this (with Image Analyst help and patience):
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
imtool close all; % Close all imtool figures.
clear; % Erase all existing variables.
workspace; % Make sure the workspace panel is showing.
% Create a logical image of a circle
rows = 280;
columns = 280;
[columnsInImage, rowsInImage] = meshgrid(1:columns, 1:rows);
centerX = 140;
centerY = 140;
radius = 125;
circlePixels = (rowsInImage - centerY).^2 ...
+ (columnsInImage - centerX).^2 <= radius.^2;
image(circlePixels) ;
axis('off', 'image');
colormap([0 0 0; 1 1 1]);
% loop to create 51 circles 5 degrees step, L 85 S 38
for hueAngle = 0 : 5 : 250
tic;
hueChannel = zeros(rows, columns);
hueChannel(circlePixels) = hueAngle / 360; % Normally goes from 0-1 which is 0-360 degrees.
saturationChannel = zeros(rows, columns);
saturationChannel(circlePixels) = 38/100;
valueChannel = zeros(rows, columns);
valueChannel(circlePixels) = 85/100;
hsvImage = cat(3, hueChannel, saturationChannel, valueChannel);
rgbImage = hsv2rgb(hsvImage);
imwrite(rgbImage,sprintf('circle_%d.png', hueAngle))
if hueAngle == 0
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);
end
end
% apply low pass gaussian filter, 10 SD
files = dir('C:\Users\andre\OneDrive\Desktop\prove_matlab\stimuli\*.png');
for k = 1 : length(files)
thisName = files(k).name
fullFileName = fullfile('C:\Users\andre\OneDrive\Desktop\prove_matlab\stimuli\', files(k).name)
theImage = imread(fullFileName);
subplot(1, 2, 1);
imshow(theImage);
drawnow;
blurredImage = imgaussfilt(theImage, 10);
subplot(1, 2, 2);
imshow(blurredImage);
drawnow;
outputBaseFileName = sprintf('blur_%s', thisName);
outputFullFileName = fullfile('C:\Users\andre\OneDrive\Desktop\prove_matlab\stimuli\', outputBaseFileName)
imwrite(blurredImage, outputFullFileName);
end