2012-05-26 9 views
8

EDITTED:- Matlabの

斐伊川、 申し訳ありませんが、以前それを言及はない、私は何をする必要があることは、同時に同じ図に6枚の画像を表示することです。 また、全ての画像(フレーム)で、私は(私のコードは、顔の動きを追跡。 - 目、鼻、唇を)いくつかの点を描画する必要があり、私は246枚の画像(フレーム)を持っている

これがメインです私が使用する関数:

// The points/ coordinates of the lips, eyes and nose of the image "i". 
Points = createPointsStructure (landmarks , i , NumOfLandarkPerFrame); 
    // Draw landmarks and splines on the frame i (and draw/show the frame) 
DrawAllPointsOnFace (pointArr , Points , img , 1 , position, i); 

どのように私はそれを行うことができますか?


同じ図の6つの画像を(同時に)表示するコードを記述する必要があります。ユーザーは画像の1つを選択して編集することができます(クリックすることにより)。

どうすればいいですか?

ありがとうございます。ここで

+1

あなたは "みましたサブプロット "機能? –

+0

はい、私は持っていますが、それはうまくいきませんでした。図の大部分は空で、画像は非常に小さかった。 –

+0

@HowaidaKhoureieh:これまでに試したコードを表示できますか? – Amro

答えて

14

はあなたが始めるために簡単な例です:に見て

function ImagesExample() 
    %# read images in a cell array 
    imgs = cell(6,1); 
    for i=1:6 
     imgs{i} = imread(sprintf('AT3_1m4_%02d.tif',i)); 
    end 

    %# show them in subplots 
    figure(1) 
    for i=1:6 
     subplot(2,3,i); 
     h = imshow(imgs{i}, 'InitialMag',100, 'Border','tight'); 
     title(num2str(i)) 
     set(h, 'ButtonDownFcn',{@callback,i}) 
    end 

    %# mouse-click callback function 
    function callback(o,e,idx) 
     %# show selected image in a new figure 
     figure(2), imshow(imgs{idx}) 
     title(num2str(idx)) 
    end 
end 

enter image description here

別の機能は、IPTのツールボックスからMONTAGE機能である:

%# given the above cell array `imgs` 
montage(cat(4,imgs{:})) 
+2

+1、きれいに詳細。 –

+0

@Amro、お返事ありがとうございます。それは本当に便利です。しかし、私は質問を編集し、あなたがそれを手伝ってくれればとてもうれしいでしょう。再度、感謝します。 –