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

조회 수: 2 (최근 30일)
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

채택된 답변

Abhisek Pradhan
Abhisek Pradhan 2019년 8월 30일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by