tcolor (a fast pcolor that likes RGB images)

Draws an image as a texture to a plane.
3,9K Downloads
Aktualisiert 25. Jul 2003

Keine Lizenz

For use like pcolor but with c as a true color matrix (uses texturemap for speed)...

H=tcolor(x,y,c[,method])

valid methods are: 'corners','normal','triangles'

The normal method is texture mapping unto the plane given by x and y (which may be distorted arbitrarily)

The 'corners' method is the fastest way to draw. However it requires that the area is non-distorted... E.g. that the box defined by the corners defines the area.

The slowest method is 'triangles'... (sort of like pcolor). But shading interp works with it.

c=imread('C:\Projects\My Pictures\peppermint_girl.jpg');
[x,y] = meshgrid(1:size(im,2),1:size(im,1));
x=x+y/10; %skew the image
H=tcolor(x,y,c,'corners')

Aslak Grinsted - July 2003

Zitieren als

Aslak Grinsted (2025). tcolor (a fast pcolor that likes RGB images) (https://de.mathworks.com/matlabcentral/fileexchange/3777-tcolor-a-fast-pcolor-that-likes-rgb-images), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R12.1
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Read, Write, and Modify Image finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0