代码:
>> I2 = I(129:228,222:321,:);
>> imshow(I2);
>>imwrite(I2,'I2.png');
代码:
>> I3 = 255-I(1:357,1:986,1:3);
>> imshow(I3);
代码:
>> I4 = I;
>> for i = 1:357
I4(357-i,:,:) = I(i,:,:);
end
>> [a,b,c] = size(I);
>> I5 = uint8(zeros(a,b,c));
>> I6 = I5(1,1:986,:);
>> I7 =I;
>> for i = 1:177
I6 = I7(i,1:986,:);
I7(i,1:986,:) = I7(357-i,1:986,:);
I7(357-i,1:986,:) = I6;
end