How to change image shape in form of V?
2 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
Guillaume
2017 年 4 月 6 日
I = checkerboard(40);
transform = fitgeotrans([1, 1; size(I, 2), 1; 1, size(I, 1); size(I)], ...
[1, 1; size(I, 2), 1; 100, size(I, 1); size(I, 2)-100, size(I, 1)], ...
'projective');
imshowpair(I, imwarp(I, transform), 'montage')
5 件のコメント
Guillaume
2017 年 4 月 6 日
I still have no idea what you want to interpolate in the black region. There is nothing there to interpolate. If you want to smear the edge of the image, you can use the older tformarray with a resampler that 'replicate' values.
transform = maketform('projective', ...
[1, 1; size(I, 2), 1; 1, size(I, 1); size(I)], ...
[1, 1; size(I, 2), 1; 100, size(I, 1); size(I, 2)-100, size(I, 1)]);
resampler = makeresampler('cubic', 'replicate');
imshowpair(I, tformarray(I, transform, resampler, [2 1], [2 1], [], []), 'montage');
However, note that most of these functions are deprecated. I don't know how to do the same with the new imwarp.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Camera Calibration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!