Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- color_vector =[0.....1] % o for blue, .5 for green and 1 for red
- R=255,0,0
- G=0,255,0
- B=0,0,255
- I = rand(100, 100); % Input data
- cmap = [1 0 0 45; 0 1 0 10; 0 1 0 45; 0 0 1 0]; % Colormap defining the transformation
- RGB = real2rgb(I, cmap); % Do the conversion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement