[matlab]copy image

来源:互联网 发布:西部世界知乎 编辑:程序博客网 时间:2024/05/20 13:38
% copy imageclearclose allclcx=imread('1.jpeg');figure;imshow(x);x=rgb2gray(x);figure;imshow(x);size_x=size(x);value_x=180;gap_x=8;add_x = 0;new_x=size_x(1)*ones(1,size_x(2));for index_x=1:size_x(2)    for index_y=1:size_x(1)        if (x(index_y,index_x) >= (value_x-gap_x)) &&  (x(index_y,index_x) <= (value_x+gap_x))            break;        end    end    new_x(index_x)=new_x(index_x)-index_y;endfigure;plot(new_x)

0 0
原创粉丝点击