how draw in surf in color blue

i want draw in blue not black in surf and i have this code
rgbPic = im2uint8(rgbPic);
axis([-500 500 -500 500 -500 500]);
xlabel('x');
ylabel('y');
zlabel('z');
xImage = [-300 300; -300 300];
yImage = [0 0; 0 0];
zImage = [300 300; -300 -300];
h=surf(xImage,yImage,zImage,...
'CData',rgbPic,...
'FaceColor','texturemap','EdgeColor','none','LineStyle','none','AlphaData',gradient(z));

5 Commenti

What is size(rgbPic), and what does imshow(rgbPic) look like?
samer mahmoud
samer mahmoud il 19 Dic 2015
Modificato: Walter Roberson il 19 Dic 2015
foreground = imfill(foreground,'holes');
bwPicSize = size(foreground);
rgbPic = zeros(bwPicSize(1),bwPicSize(2),3);
rgbPic(foreground==0)=255;
rgbPic(:,:,2) = rgbPic(:,:,1);
rgbPic(:,:,3) = rgbPic(:,:,1);
walter this the code define all
Change it to
tmp = zeros(bwPicSize(1),bwPicSize(2));
tmp(foreground==0)=255;
rgbPic = zeros(bwPicSize(1),bwPicSize(2),3);
rgbPic(:,:,3) = tmp;

Accedi per commentare.

Risposte (0)

Categorie

Tag

Richiesto:

il 18 Dic 2015

Commentato:

il 19 Dic 2015

Community Treasure Hunt

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

Start Hunting!

Translated by