mparkan / Digital-Forestry-Toolbox

A collection of digital forestry tools for Matlab/Octave
http://mparkan.github.io/Digital-Forestry-Toolbox/
GNU General Public License v3.0
46 stars 16 forks source link

Error: 'fspecial' & bwdist for CHM Exercice 2 #6

Closed diouck closed 4 years ago

diouck commented 4 years ago

Error: 'fspecial' & bwdist for CHM Exercice 2 Hello , I am currently experimenting with your work on LIDAR data for an urban planning agency. The tutorial is well done. I finished exercise 1, but I am a beginner, I encounter an error for the generation of CHM of exercise 2. I do not have Matlat but I work with Octave.

error: 'fspecial' undefined near line 9 column 24 error: 'bwdist' undefined near line 174 column 12 Thank

mparkan commented 4 years ago

Did you install and load the required octave packages ("image", "statistics")?

If not, type the following in the octave Command Window: pkg install image -forge pkg install statistics -forge

diouck commented 4 years ago

Hello and thank you for your answer.Thank you very much after the installation I launched the pkg load image command and it worked. Thank

diouck commented 4 years ago

I'm just going to ask a question how can I export the segmentation to get the grip of the canopic surface in shp format

diouck commented 4 years ago

Otherwise, at levels of exercise 3, I also have this error >> ind = sub2ind([nrows, ncols], P(:,1), P(:,2)); error: 'nrows' undefined near line 1 column 16 have you un idea

Thanks

diouck commented 4 years ago

Hello, For info compared to tutorial 3, I had to try to hazar the numbers. And I put the proposed numbers to make it work.

`>> ind = sub2ind([1, 2], P(:,1), P(:,2)); error: sub2ind: index (2001,_): out of bound 1

ind = sub2ind([10, 20], P(:,1), P(:,2)); error: sub2ind: index (2001,): out of bound 10 ind = sub2ind([2001, 20], P(:,1), P(:,2)); error: sub2ind: index (,2801): out of bound 20 ind = sub2ind([2001, 2801], P(:,1), P(:,2)); xyh = [pc.record.x, pc.record.y, pc.record.z - models.terrain.values(ind)]; `

However, it is impossible to export the data in csv format `>> fid = fopen('C:\LIDAR\NM\tiges.csv', 'w+'); % open file

fprintf(fid, 'X, Y, H\n'); % write header line fprintf(fid, '%.2f, %.2f, %.2f\n', xyh_stem'); % write r ecords fclose(fid); % close file xyh_stem xyh_stem = fid fid = 6 ` But my question is how to find nrows and ncols directly.

Thank you

diouck commented 4 years ago

Now to find nrows and ncols i use [nrows, ncols] = size(models.terrain.values); But impossible to export data to CSV file

mparkan commented 4 years ago

Please make sure:

I've also modified tutorial 2 to allow export of segment (individual tree) boundaries. Let me know how it works.

mparkan commented 4 years ago

Closing this due to inactivity.