Borrar filtros
Borrar filtros

Matlab Fit Geo Trans

4 visualizaciones (últimos 30 días)
Noah Noah
Noah Noah el 9 de Mzo. de 2022
Comentada: Noah Noah el 9 de Mzo. de 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. :)

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by