フィルターのクリア

I want to crop image for each side column(left and right).

3 ビュー (過去 30 日間)
Nurul Najmah
Nurul Najmah 2015 年 4 月 30 日
回答済み: Image Analyst 2015 年 4 月 30 日
I am trying use this code,but it crop each row(up and bottom). How to crop it trough each 10 column left and right?
clc;
%%read the image
IMG = 'laluan.jpg';
I = imread(IMG);
IJ = rgb2gray(I);
IK = double(IJ);
%crop 10 pixels off each side
IK = IK(50:end-10, 50: end-10);
originalImage = uint8(IK);
subplot (221);
imshow(I);
subplot(222);
imshow(originalImage);

採用された回答

Image Analyst
Image Analyst 2015 年 4 月 30 日
IK = IK(:, 11:end-10); % Crop 10 pixels off each side, none off the rows.

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by