tcolor (a fast pcolor that likes RGB images)

版本 1.0.0.0 (951 字节) 作者: Aslak Grinsted
Draws an image as a texture to a plane.
3.9K 次下载
更新时间 2003/7/25

无许可证

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

引用格式

Aslak Grinsted (2025). tcolor (a fast pcolor that likes RGB images) (https://ww2.mathworks.cn/matlabcentral/fileexchange/3777-tcolor-a-fast-pcolor-that-likes-rgb-images), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R12.1
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Read, Write, and Modify Image 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0