- #1
Jordon
- 1
- 0
Homework Statement
1.invert all pixel of a 20x20 window around I(X,Y)
2.set all pixel aroud the in the inverted images
Homework Equations
cant make work right way.
Please help me to solve problem.
Thanks,
The Attempt at a Solution
I=imread('test7.jpg'); % Load the image file and store it as the variable I.
x1=floor(rand*240+8);% generate random varible x1
y1=floor(rand*240+8);% generate random varible y1
for i=y1-7:y1+7
for j=x1-7:x1+7 % Show15x15 With (x,y) in the center
Ired(i,j)=I(i,j);
end
end
B=inv(Ired);
imshow(B); % show the modified image