射影変換を行いたいです

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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Sudoku에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!