使用matlab去除彩色图像背景代码: im=imread('7.jpg'); im=rgb2gray(im); imm=double(im); figure,imagesc(imm),colormap(gray) hist(imm);figure(gcf); im1=imm