射影変換を行いたいです
Show older comments
射影変換を行い、写真上の一部の台形部分をピックアップし、長方形として表示したいです。
台形の角の4点の座標(ピクセル上の座標)は取得できたのですが、調べても射影変換の作業がよくわかりません。
ご教授いただけないでしょうか。
2 Comments
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
on 9 Nov 2022
Answers (0)
Categories
Find more on Sudoku in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!