필터 지우기
필터 지우기

Matlab Fit Geo Trans

조회 수: 4 (최근 30일)
Noah Noah
Noah Noah 2022년 3월 9일
댓글: Noah Noah 2022년 3월 9일
I am projecting a rotated image into its desired position by using fitgeotrans with its fixedpoints and moving points using the projective attribute.
I have found that this works - however the background image sometimes come into the picture and messes up my binary mask.
Would it be possible to fit geotrans and only display the image in its rotated form?
t = fitgeotrans(MovingPoints,FixedPoints,"projective")
transform = imwarp(targetImg,t);
My image has this black corner which i'm guessing is coming from the background image that it has been projected onto. I wish to simply rotate the image and display it rotated. :)

채택된 답변

Benjamin Thompson
Benjamin Thompson 2022년 3월 9일
imwarp accepts an argument 'FillValues' if you want to specify some other intensity or color. Depending on the nature of the transformation you get from fitgeotrans, some parts of the output image may be undefined and so they need some color to assign.
Also look at the 'OutputView' argument which gives you more control over which part of the output image is provided as output from imwarp.
  댓글 수: 1
Noah Noah
Noah Noah 2022년 3월 9일
Thank you! I have Filled Values with all white and I guess it's more accepted form than before.
Thank you

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by