9

編集済み:

こんにちは、先ほどは言わずに申し訳ありませんが、同じ図に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つを選択して編集できるようにします(クリックして)。

どうすればそれを行うことができますか?

前もって感謝します。

4

1 に答える 1

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

ここに画像の説明を入力してください

調べるべきもう1つの関数は、IPTToolboxのMONTAGE関数です。

%# given the above cell array `imgs`
montage( cat(4,imgs{:}) )
于 2012-05-26T21:52:06.627 に答える