Effacer les filtres
Effacer les filtres

Matlab Fit Geo Trans

4 vues (au cours des 30 derniers jours)
Noah Noah
Noah Noah le 9 Mar 2022
Commenté : Noah Noah le 9 Mar 2022
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. :)

Réponse acceptée

Benjamin Thompson
Benjamin Thompson le 9 Mar 2022
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 commentaire
Noah Noah
Noah Noah le 9 Mar 2022
Thank you! I have Filled Values with all white and I guess it's more accepted form than before.
Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by