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})