Use of Bresenham line algorithm to generate 1D profiles from a DTM

조회 수: 2 (최근 30일)
Cai Ladd
Cai Ladd 2014년 7월 7일
댓글: Cai Ladd 2014년 7월 10일
Hello all, I'm wanting to quantify surface roughness of slumped material that form along saltmarsh creek margins. I will do this by measuring the Root Mean Square height of a 1-meter transect across the creek edge, to generate a graph of elevation (y) against distance (x). To do this, one must extract a 1D profile from a Digital Terrain Model (DTM). I'm hoping someone here can advise me how best to do this.
For a little more info on the problem, here's an extract from Bretar et al. (2013) on how the process of creating 1D profiles works:
"The Bresenham line algorithm determines which points should be selected in the regular grid DTM model to form a straight line. Detrending (i.e. subtraction of a best-fit line from the data, allows us to remove the influence of the local slope and to study the microrelief around a horizontal reference level" .
I have created a DTM using photogrammetry (a series of overlapping images, where the relative movement of pixels in each image is used to generate a 3D model. A scale bar included in each image allows the model have an accurate scale-factor associated with it). The fist step is to generate a dense point cloud using 'VisualSFM', and connect the points with a mesh, using 'MeshLab' (it is at this stage I apply the scaling-factor). Having generated the DTM, how do I go about employing the Bresenham line algorithm to extract a series of 1D profiles? Can this be done on MatLab?
Note: I'm not sure how to import a DTM to MatLab. I'm trying to work it out now. I'm not sure if, having generated a DTM on 'Meshlab', how to export that data as, say, an ASCII-file. I imagine it is then just a matter of importing ASCII into MatLab, and running the Bresenham line algorithm?
Many thanks, Cai Ladd

채택된 답변

Spandan Tiwari
Spandan Tiwari 2014년 7월 7일
편집: Spandan Tiwari 2014년 7월 7일
If you can morph the data into a 2D matrix, say as a 2D image, you can use the function improfile from the Image processing Toolbox to get 1D profiles.
  댓글 수: 1
Cai Ladd
Cai Ladd 2014년 7월 10일
Ah ok, that's a good idea. I've still got to generate the DTM model, but once done I'll report back to let you know how I got on.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by