Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

阿才 asked in 電腦與網際網路軟體 · 1 decade ago

用matlab把圖片切割

我想問一下

如何把一張圖片分割

假設3 x 3好了

然後該如何把他儲存下來

1 Answer

Rating
  • ivan
    Lv 5
    1 decade ago
    Favorite Answer

    imcrop - Crop image

    Syntax

    I = imcrop

    I2 = imcrop(I)

    X2 = imcrop(X, map)

    I = imcrop(h)

    I2 = imcrop(I, rect)

    X2 = imcrop(X, map, rect)

    [...] = imcrop(x, y,...)

    [I2 rect] = imcrop(…)

    [X,Y,I2,rect] = imcrop(…)

    Description

    I = imcrop creates an interactive Crop Image tool associated with the image displayed in the current figure, called the target image. The Crop Image tool is a moveable, resizable rectangle that you can position interactively using the mouse. When the Crop Image tool is active, the pointer changes to cross hairs when you move it over the target image. Using the mouse, you specify the crop rectangle by clicking and dragging the mouse. You can move or resize the crop rectangle using the mouse. When you are finished sizing and positioning the crop rectangle, create the cropped image by double-clicking the left mouse button or by choosing Crop Image from the context menu. imcrop returns the cropped image, I. The following figure illustrates the Crop Image tool with the context menu displayed. For more information about the interactive capabilities of the tool, see the table that follows.

    Examples

    I = imread('circuit.tif');

    I2 = imcrop(I,[75 68 130 112]);

    imshow(I), figure, imshow(I2)

    Source(s): matlab help
Still have questions? Get your answers by asking now.