No BSD License  

Highlights from
tcolor (a fast pcolor that likes RGB images)

4.4

4.4 | 5 ratings Rate this file 9 Downloads (last 30 days) File Size: 1.79 KB File ID: #3777

tcolor (a fast pcolor that likes RGB images)

by Aslak Grinsted

 

23 Jul 2003 (Updated 25 Jul 2003)

Draws an image as a texture to a plane.

| Watch this File

File Information
Description

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

MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
18 Aug 2003 Mark Harper  
11 Feb 2005 Kartika Munir  
29 Mar 2005 Aslak Grinsted

Please leave a comment when you give such a low rating. If you report a specific problem then i'm sure i could fix it.

29 Jun 2005 Bjorn Gustavsson

Works. Usefull function that fills a gap in matlabs plot functions.

16 Jun 2009 IOCAS Shen

Great! It is indeed fast and most important of all it can be used for rgb color image, good job!

14 Jul 2011 rave  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
specialized Aslak Grinsted 22 Oct 2008 07:05:19
plotting Aslak Grinsted 22 Oct 2008 07:05:19
pcolor Aslak Grinsted 22 Oct 2008 07:05:19
image Aslak Grinsted 22 Oct 2008 07:05:19
rotated Aslak Grinsted 22 Oct 2008 07:05:19
warp Aslak Grinsted 22 Oct 2008 07:05:19
surface Aslak Grinsted 22 Oct 2008 07:05:19
rgb Aslak Grinsted 01 Jul 2011 06:45:33
texture Aslak Grinsted 01 Jul 2011 06:45:45
fast Aslak Grinsted 01 Jul 2011 06:45:51
imagesc Aslak Grinsted 15 Jul 2011 08:14:31
surf Aslak Grinsted 15 Jul 2011 08:14:34

Contact us at files@mathworks.com