How to warp texture onto a part of an object (for example the cylinder) ?

2 visualizaciones (últimos 30 días)
I know there's warp command and how to warp a texture onto a cylinder
[X,Y,Z] = cylinder(imgRows,imgCols);
h = warp(X,Y,Z,imgRGB);
some time, if I only want to warp onto a part of the cylinder. I tried to use padding (white around) to make the texture bigger. But it's not in good shape.
also how to warp in perpendicular direction ? (context: I would like to create synthetic barcode printed on a cylinder shape metal can, normally, warp only gives me landscape placing on the cylinder, not portrait direction)
Thanks

Respuesta aceptada

Abhisek Pradhan
Abhisek Pradhan el 30 de Ag. de 2019
One possible workaround will be to rotate the image using imrotate and then use warp function for wrapping around the cylinder. Or make an image of required dimensions consisting of all the elements which you want to put around the cylinder and then warp it. This will ensure it is in good shape.

Más respuestas (0)

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by