my_image =imread('C:\Users\mojtaba.houballah\Desktop\Matlab\road map.PNG');
for R=1:617
for C=1:306
pixel=my_image(R,C);
if pixel<=200 , pixel=0; end
if (235 < pixel) && (pixel<=250) , pixel= 237; end
if pixel>254 , pixel=255; end
Roads(R,C)=pixel;
end
end
im_Roads=mat2gray(Roads);
figure,imshow(im_Roads);
title('Road map (2008)');
disp(Roads)
% a = sum(Roads(:)==0);
% b = sum(Roads(:)==255);
% c = sum(Roads(:)==237);
% A = a/(a+b);
% NA = b/(a+b);
% k = randi([1000 1100],1,1);
% A50YEARSnew = (a+10*k)/(a+b); %%keeping in mind that every 5 years we have a new road that increases the accessibility
as you can see i the for loops, i grouped the pixels into 3 colors , one for the roads, one for the non roads, and one for the boundaris of the picture ( which i dont need in my analysis)
so now i am trying to define accessibility areas from the roads, so i am trying to define small circles centered at the pixels that are related to the roads with a radius that i wish to set
i am not sure i understand the code you sent me, i tried it and i got an error (Error using conv2 , First and second arguments must be single or double.)
I am realy very new to matlab (like a week new) so if you can put everything in detail, i would be grateful)
I await your feedback Thank yo for the help