- MATLAB documentation of “readgeoraster’ function: https://www.mathworks.com/help/map/ref/readgeoraster.html#d126e146620
combing dem and edge detected image
2 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
回答 (1 件)
Aishwarya
2023 年 10 月 11 日
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Feature Detection and Extraction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!