射影変換を行いたいです
显示 更早的评论
射影変換を行い、写真上の一部の台形部分をピックアップし、長方形として表示したいです。
台形の角の4点の座標(ピクセル上の座標)は取得できたのですが、調べても射影変換の作業がよくわかりません。
ご教授いただけないでしょうか。
2 个评论
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
2022-11-9
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Sudoku 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!