射影変換を行いたいです

射影変換を行い、写真上の一部の台形部分をピックアップし、長方形として表示したいです。
台形の角の4点の座標(ピクセル上の座標)は取得できたのですが、調べても射影変換の作業がよくわかりません。
ご教授いただけないでしょうか。

2 Kommentare

Atsushi Ueno
Atsushi Ueno am 3 Nov. 2022
Ibw = rgb2gray(imread('photoEx5.jpg')) < 127;
movingPoints = [142,127;646,167;723,604;154,689]; % 変換前の数独の四隅
fixedPoints = [1 1; 9 1; 9 9; 1 9]/10.*size(Ibw); % 変換後の数独の四隅
tform = fitgeotrans(movingPoints,fixedPoints,"projective");
Ibw_warp = imwarp(Ibw,tform);
montage({Ibw,Ibw_warp})
kuroshiba
kuroshiba am 9 Nov. 2022
ありがとうございます!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Sudoku finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 3 Nov. 2022

Kommentiert:

am 9 Nov. 2022

Community Treasure Hunt

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

Start Hunting!