I am using mlab.surf to convert a grayscale image into a 3d image based on 
brightness per pixel. What I want to do is in the 3d plot, have different pixel 
heights be different colors based on elevation. This is what I am doing. Any 
suggestions?

import numpy as np
import cv2
from mayavi import mlab

orig = cv2.imread(".\orig.png")
x = np.mgrid[0:orig.shape[0]]
y = np.mgrid[0:orig.shape[1]]
mlab.surf(x,y,orig, colormap='jet', warp_scale='auto')

This gives me a beautiful object in grayscale but it would be made easier to 
visualize in color.


Ryan Godbey

The Pennsylvania State University | Class of 2021

Candidate for Bachelor of Science in Physics
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to