How to obtain an image from meshlsrm plot?

Hi, I have a Digital Elevation Model on a .tif file. In order to visualize a shaded relief version of it, I’m using this code:

A = geotiffread('dem.tif');
info = geotiffinfo('dem.tif');
lat = info.CornerCoords.Lat;
lon = info.CornerCoords.Lon;
RObj = georasterref('RasterSize',size(A),'LatitudeLimit',[min(lat(:)) max(lat(:))],'LongitudeLimit',[min(lon(:)) max(lon(:))]);
worldmap(A,RObj);
cmap = colormap(gray(256));
meshlsrm(A,RObj,[135, 27],cmap);

On the plot that result from meshlsrm, I have to do other elaboration (for example I need to use the canny edge detector, and the the Hough transform). Someone knows a way in order to obtain a gray scale image from meshlsrm?

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

The color displayed is determined by the colormap. You can change it from the default to grayscale with the following command:

colormap gray

Afterward, you can do something like the following to obtain the actual image from the surface object:

image = frame2im(getframe(gcf));
image = rgb2gray(image);
figure; imshow(image);

SEE COMPLETE ANSWER CLICK THE LINK

--

--

--

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Data Anti-Patterns — The Import Macro

Ranking MMA fighters using the Elo rating system

How to detect noisy data / outliers?

Discovering Data

Basic Stats 2

Finding Footbridges

Evaluate Classification Model Performance with Cumulative Gains and Lift Curves

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Technical Source

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

More from Medium

How to apply a Color Thresholder function in Image Batch Processor

How are GPUs used for Deep Learning?

Install TensorFlow with GPU Acceleration Simultaneously for Windows and WSL Linux (1)

Ugly or Nice? Classifying Christmas Sweaters with Computer Vision