²é¿´: 515  |  »Ø¸´: 0

sacredli

гæ (³õÈëÎÄ̳)

[ÇóÖú] ÔÚÏßÇóÖú ´óÉñ°ïÎÒ¿´Ò»Ï Õâ¶Î³ÌÐòÓÐʲôÎÊÌâ ½ô¼±£¡£¡£¡£¡£¡£¡

function idisp(z, clip, ncmap)

if nargin < 3,
    %         ncmap = 64;
    ncmap = 256;
end

if (nargin > 0) & ~isstr(z),
  
   
    clf
    colormap(gray(ncmap))
    n = ncmap;
    if nargin == 2,
        if length(clip) == 2,
            z(find(z<clip(1))) = clip(1);
            z(find(z>clip(2))) = clip(2);
        elseif length(clip) == 1,
            z(find(z>clip)) = clip;
        end
    end
    hi = image(z);
    hh = max(max(z));
    mm = min(min(z));
    [r1 c1] = find(z == hh);
    [r2 c2] = find(z == mm);
    set(hi, 'CDataMapping', 'scaled');
    htf = uicontrol(gcf, ...
        'style', 'text', ...
        'units',  'norm', ...
        'pos', [.8 .93 .2 .07], ...
        'string', '' ...
        );
    htf1= uicontrol(gcf, ...
        'style', 'text', ...
        'units',  'norm', ...
        'pos', [0 0 0.2 .06], ...
        'string', '' ...
        );
    htf2= uicontrol(gcf, ...
        'style', 'text', ...
        'units',  'norm', ...
        'pos', [0.7 0 0.3 .06], ...
        'string', '' ...
        );
    ud = [gca htf hi axis htf2 r2(1) c2(1) mm htf1 r1(1) c1(1) hh];
    set(gca, 'UserData', ud);
    set(hi, 'UserData', ud);
   
    hpb=uicontrol(gcf,'style','push','string','line', ...
        'units','norm','pos',[0 .93 .1 .07], ...
        'userdata', ud, ...
        'callback', 'idisp(''line'')');
    hzm=uicontrol(gcf,'style','push','string','zoom', ...
        'units','norm','pos',[.1 .93 .1 .07], ...
        'userdata', ud, ...
        'callback', 'idisp(''zoom'')');
    huz=uicontrol(gcf,'style','push','string','unzoom', ...
        'units','norm','pos',[.2 .93 .15 .07], ...
        'userdata', ud, ...
        'callback', 'idisp(''unzoom'')');
   
    set(hi, 'UserData', ud);
    set(gcf, 'WindowButtonDownFcn', 'idisp(''down'')');
    set(gcf, 'WindowButtonUpFcn', 'idisp(''up'')');
    return;
end


if nargin == 0,
    h = get(gcf, 'CurrentObject'); % image
    ud = get(h, 'UserData');                % axis
    h_ax = ud(1);        % axes
    tf = ud(2);        % string field
    hi = ud(3);        % the image
    cp = get(h_ax, 'CurrentPoint');
    x = round(cp(1,1));
    y = round(cp(1,2));
    imdata = get(hi, 'CData');
    set(tf, 'String', ['(' num2str(y) ', ' num2str(x) ') = ' num2str(imdata(y,x))]);
   
    htf1 = ud(end-3);       
    r1 = ud(end-2);       
    c1 = ud(end-1);       
    hh = ud(end);
    htf2 = ud(end-7);       
    r2 = ud(end-6);       
    c2 = ud(end-5);       
    mm = ud(end-4);
    set(htf1, 'String', ['(' num2str(r1) ', ' num2str(c1) ') = ' num2str(hh)]);
    set(htf2, 'String', ['(' num2str(r2) ', ' num2str(c2) ') = ' num2str(mm)]);
    drawnow
elseif nargin == 1,
    switch z,
        case 'down',
            % install pixel value inspector
            set(gcf, 'WindowButtonMotionFcn', 'idisp');
            idisp
            
        case 'up',
            set(gcf, 'WindowButtonMotionFcn', '');
            
        case 'line',
            h = get(gcf, 'CurrentObject'); % push button
            ud = get(h, 'UserData');
            ax = ud(1);        % axes
            tf = ud(2);        % string field
            hi = ud(3);        % the image
            set(tf, 'String', 'First point');
            [x1,y1] = ginput(1);
            x1 = round(x1); y1 = round(y1);
            set(tf, 'String', 'Last point');
            [x2,y2] = ginput(1);
            x2 = round(x2); y2 = round(y2);
            set(tf, 'String', '');
            imdata = get(hi, 'CData');
            dx = x2-x1; dy = y2-y1;
            if abs(dx) > abs(dy),
                x = min(x1,x2):max(x1,x2);
                y = round(dy/dx * (x-x1) + y1);
                nim = size(x,2);
                for kn = 1:nim
                    imgout(kn) = imdata(y(kn),x(kn));
                end
                figure;plot(x,imgout); xlabel('Coordinate (X)')
            else
                y = min(y1,y2):max(y1,y2);
                x = round(dx/dy * (y-y1) + x1);
                nim = size(y,2);
                for kn = 1:nim
                    imgout(kn) = imdata(y(kn),x(kn));
                end
                figure;plot(y,imgout); xlabel('Coordinate (Y)')
            end
                 
        case 'zoom',
            h = get(gcf, 'CurrentObject'); % push button
            ud = get(h, 'UserData');
            ax = ud(1);        % axes
            tf = ud(2);        % string field
            hi = ud(3);        % the image
            set(tf, 'String', 'First point');
            [x1,y1] = ginput(1);
            x1 = round(x1); y1 = round(y1);
            set(tf, 'String', 'Last point');
            [x2,y2] = ginput(1);
            x2 = round(x2); y2 = round(y2);
            set(tf, 'String', '');
            axes(ax);
            axis([x1 x2 y1 y2]);
        case 'unzoom',
            h = get(gcf, 'CurrentObject'); % push button
            ud = get(h, 'UserData');
            h_ax = ud(1);        % axes
            axes(h_ax);
            axis(ud(4:7));
    end
end
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ÖÇÄÜ»úÆ÷ÈË

Robot (super robot)

ÎÒÃǶ¼°®Ð¡Ä¾³æ

ÕÒµ½Ò»Ð©Ïà¹ØµÄ¾«»ªÌû×Ó£¬Ï£ÍûÓÐÓÃŶ~

¿ÆÑдÓСľ³æ¿ªÊ¼£¬ÈËÈËΪÎÒ£¬ÎÒΪÈËÈË
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ sacredli µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 274Çóµ÷¼Á +8 S.H1 2026-03-18 8/400 2026-03-20 11:53 by ѧԱ8dgXkO
[¿¼ÑÐ] Ò»Ö¾Ô¸ ÄϾ©º½¿Õº½Ìì´óѧ´óѧ £¬080500²ÄÁÏ¿ÆÑ§Ó빤³Ìѧ˶ +4 @taotao 2026-03-20 4/200 2026-03-20 10:37 by EBSD
[¿¼ÑÐ] Ò»Ö¾Ô¸Öйúº£Ñó´óѧ£¬ÉúÎïѧ£¬301·Ö£¬Çóµ÷¼Á +5 1ËïÎò¿Õ 2026-03-17 6/300 2026-03-19 23:46 by zcl123
[¿¼²©] É격26Äê +3 °Ë6°Ë68 2026-03-19 3/150 2026-03-19 19:43 by nxgogo
[¿¼ÑÐ] 085600²ÄÁÏÓ뻯¹¤µ÷¼Á 324·Ö +10 llllkkkhh 2026-03-18 12/600 2026-03-19 14:33 by llllkkkhh
[¿¼ÑÐ] 328Çóµ÷¼Á£¬Ó¢ÓïÁù¼¶551£¬ÓпÆÑо­Àú +4 ÉúÎ﹤³Ìµ÷¼Á 2026-03-16 12/600 2026-03-19 11:10 by ÉúÎ﹤³Ìµ÷¼Á
[¿¼ÑÐ] Ò»Ö¾Ô¸Ìì´ó²ÄÁÏÓ뻯¹¤£¨085600£©×Ü·Ö338 +5 ²Ì´óÃÀÅ® 2026-03-13 5/250 2026-03-19 10:44 by ÊÇСÁõѽ¡«
[¿¼ÑÐ] 332Çóµ÷¼Á +3 ydfyh 2026-03-17 3/150 2026-03-19 10:14 by ¹¦·ò·è¿ñ
[¿¼ÑÐ] ²ÄÁϹ¤³Ìר˶µ÷¼Á +5 204818@lcx 2026-03-17 6/300 2026-03-18 22:55 by 204818@lcx
[¿¼ÑÐ] Ò»Ö¾Ô¸ÎäÀí²ÄÁÏ305·ÖÇóµ÷¼Á +5 ÏëÉϰ¶µÄÀðÓã 2026-03-18 6/300 2026-03-18 17:53 by Î޼ʵIJÝÔ­
[¿¼ÑÐ] 085601ר˶£¬×Ü·Ö342Çóµ÷¼Á£¬µØÇø²»ÏÞ +5 share_joy 2026-03-16 5/250 2026-03-18 14:48 by haxia
[¿¼ÑÐ] 312Çóµ÷¼Á +8 İå·Ï£ 2026-03-16 9/450 2026-03-18 12:39 by Linda Hu
[¿¼ÑÐ] ÉúÎïѧ071000 329·ÖÇóµ÷¼Á +3 ÎÒ°®ÉúÎïÉúÎﰮΠ2026-03-17 3/150 2026-03-18 10:12 by macy2011
[¿¼ÑÐ] 301Çóµ÷¼Á +9 yyÒªÉϰ¶Ñ½ 2026-03-17 9/450 2026-03-18 08:58 by Î޼ʵIJÝÔ­
[¿¼ÑÐ] 278Çóµ÷¼Á +5 ÑÌ»ðÏÈÓÚ´º 2026-03-17 5/250 2026-03-18 08:43 by ÐÇ¿ÕÐÇÔÂ
[¿¼ÑÐ] 290Çóµ÷¼Á +3 p asserby. 2026-03-15 4/200 2026-03-17 16:35 by wangkm
[¿¼ÑÐ] Ò»Ö¾Ô¸ËÕÖÝ´óѧ²ÄÁϹ¤³Ì£¨085601£©×¨Ë¶ÓпÆÑо­ÀúÈýÏî¹ú½±Á½¸öʵÓÃÐÍרÀûÒ»ÏîÊ¡¼¶Á¢Ïî +6 ´ó»ðɽС»ðɽ 2026-03-16 8/400 2026-03-17 15:05 by ÎÞи¿É»÷111
[¿¼ÑÐ] 326Çóµ÷¼Á +4 ŵ±´¶û»¯Ñ§½±êéê 2026-03-15 7/350 2026-03-16 17:11 by ŵ±´¶û»¯Ñ§½±êéê
[¿¼ÑÐ] ÖпÆÔº²ÄÁÏ273Çóµ÷¼Á +4 yzydy 2026-03-15 4/200 2026-03-16 15:59 by Gaodh_82
[¿¼ÑÐ] 22408×Ü·Ö284Çóµ÷¼Á +3 InAspic 2026-03-13 3/150 2026-03-15 11:10 by zhq0425
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û