射影変換を行いたいです

33 visualizzazioni (ultimi 30 giorni)
kuroshiba
kuroshiba il 3 Nov 2022
Commentato: kuroshiba il 9 Nov 2022
射影変換を行い、写真上の一部の台形部分をピックアップし、長方形として表示したいです。
台形の角の4点の座標(ピクセル上の座標)は取得できたのですが、調べても射影変換の作業がよくわかりません。
ご教授いただけないでしょうか。
  2 Commenti
Atsushi Ueno
Atsushi Ueno il 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 il 9 Nov 2022
ありがとうございます!

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Sudoku in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!