Is it possible to morph a polygonal ROI into the shape of a second polygon?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everybody,
I was wondering (because it would be extremely helpful to a piece of code I am writing) whether it is possible to specify a region of interest in an image, using impoly for instance, and then morph/reshape this ROI into a different shape? I imagine this working by using some form of image interpolation.
What I want to do is morph an angled rectangle into a vertical rectangle of the same size, I dont want to rotate the image (I have done this already) I want to morph the data in the image (i.e. stretch/squeeze it to fit the new polygon).
Any help with this problem would be appreciated. I know Matlab can do image interpolation and can resize images etc, I just can't find a way to reshape an image...
Thanks,
Rod.
0 commentaires
Réponses (2)
Image Analyst
le 7 Nov 2014
Another way is to use activecontour(). Just pass in one as the starting region, one as the ending region, and pass in different number of iterations to get different "in between" regions. See my demo, attached, which creates images like this:
You can see the initial polygon in the lower left, the target polygon in the upper right, and an "in between" polygon in the lower middle. How closely the boundary "Hugs" the final polygon is determined by how many iterations you tell it to do.
0 commentaires
Voir également
Catégories
En savoir plus sur Geometric Transformation and Image Registration dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!