Image processing function works to skew an image but Im not sure why?

조회 수: 6 (최근 30일)
Marshall
Marshall 2015년 11월 14일
답변: Marshall 2015년 11월 14일
In plain english could someone explain each maketform, makresampler, and imtransform and how they work. If I am trying to make some transformation to an image, what can I do to obtain certain paramters. clear clc black = [0 0 0]'; a = .15; T = maketform('affine', [1 0 0; a 1 0; 0 0 1] ); A = imread('SI3_LAOSub_3600kx_Map_HAADF.tif'); h1 = figure; imshow(A); title('Original Image') R = makeresampler({'cubic','nearest'},'fill'); B = imtransform(A,T,R,'FillValues',orange); h2 = figure; imshow(B); title('Sheared Image');
This code works to effectively shear a lattice from not parallel to parallel. But im not sure why.

채택된 답변

Marshall
Marshall 2015년 11월 14일
if true
% code
end
clc
black = [0 0 0]';
a = .15;
T = maketform('affine', [1 0 0; a 1 0; 0 0 1] );
A = imread('SI3_LAOSub_3600kx_Map_HAADF.tif');
h1 = figure; imshow(A); title('Original Image')
R = makeresampler({'cubic','nearest'},'fill');
B = imtransform(A,T,R,'FillValues',orange);
h2 = figure; imshow(B);
title('Sheared Image');
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by