Matlab Fit Geo Trans

4 次查看(过去 30 天)
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
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