combing dem and edge detected image

2 visualizaciones (últimos 30 días)
sedigheh pagheh
sedigheh pagheh el 3 de Mayo de 2022
Respondida: Aishwarya el 11 de Oct. de 2023
Hi everybody,
I want to combine a dem file (or slope) with an edge detected image? I want to identify some areas in edge detected image using dem or slope.
I think if I could combine them and add the elevation as a new band so that every pixel could have a elevation this problem could be solved but as I am new in matlab I do not know how can I do that.

Respuestas (1)

Aishwarya
Aishwarya el 11 de Oct. de 2023
Hi Sedigheh,
I understand you want to combine elevation data from DEM file and edge detected image so that elevation data is available at each pixel of image. One approach could be to add elevation as another dimension to the image.
Below I have provided an example implementation for the same.
% Read the DEM file and the edge detected image
[A,R, cmap] = readgeoraster('boston.dem');
img = imread("edge_detection.jpg");
% Elevation at each point
elevation_data = A;
% Resize image to match size of elevation_data
img_resized = imresize(img, size(elevation_data));
% Concatenate image and elevation data along new dimension
image_with_elevation = cat(3, img, elevation_data);
Please refer to the following link for more information:
Hope this helps!
Regards,
Aishwarya

Categorías

Más información sobre Feature Detection and Extraction en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by