3D surface modeling of a giant redwood trunk

General discussions of measurement techniques and the results of testing of techniques and equipment.

Moderators: edfrank, dbhguru

Post Reply
User avatar
M.W.Taylor
Site Admin
Posts: 530
Joined: Sun May 29, 2011 11:45 am

Re: 3D surface modeling of a giant redwood trunk

Post by M.W.Taylor » Sat Jan 21, 2012 3:47 am

Rand,

Thanks for the tip on how you got that nice looking mesh. I got something to work but it did not look as nice as yours. The program, MeshLab for PC has no text documention online as far as I can tell ? I searched everywhere online for one and found nothing. The only thing I really find it useful for is viewing graphics.

The attached are a few PLY files for you to look at in MeshLab. They are from the pictures I posted earlier.

Michael

fooman
Posts: 100
Joined: Sun Dec 25, 2011 2:18 pm

Re: 3D surface modeling of a giant redwood trunk

Post by fooman » Sat Jan 21, 2012 9:23 am

Try http://www.cyi.ac.cy/system/files/MeshL ... ation1.pdf for 3rd party documentation of Meshlab.

Edit: there is a bunch on presentations on 3d scanning, including the use of Meshlab at http://vcg.isti.cnr.it/~callieri/blendercourse.html. This may be of some interest.

Cheers,
Matt

User avatar
Rand
Posts: 1217
Joined: Tue Mar 16, 2010 9:25 pm

Re: 3D surface modeling of a giant redwood trunk

Post by Rand » Sat Jan 21, 2012 11:10 am

fooman wrote:Try http://www.cyi.ac.cy/system/files/MeshL ... ation1.pdf for 3rd party documentation of Meshlab.

Edit: there is a bunch on presentations on 3d scanning, including the use of Meshlab at http://vcg.isti.cnr.it/~callieri/blendercourse.html. This may be of some interest.

Cheers,
Matt
http://www.youtube.com/watch?v=YKUOB8MN4Kc

User avatar
M.W.Taylor
Site Admin
Posts: 530
Joined: Sun May 29, 2011 11:45 am

Re: 3D surface modeling of a giant redwood trunk

Post by M.W.Taylor » Sun Jan 22, 2012 11:10 pm

Rand & Matt,

Now attaching the PLY files for the various tree I attached JPGs of earlier.

These cloud sets look much better with distance attuation to "False" in Tools-Options and pixel size to 1 or 2. This set is not filtered yet so need to re-center axis in Filters-Normals,Curvatures, Orientations and then Trasform:Move,Translate, Center. Mouse click on new axis.
With distance attentuation set to "True" the pixels increase in size to the point of blurring.
Enjoy !
Michael
Attachments

[The extension ply has been deactivated and can no longer be displayed.]

Last edited by M.W.Taylor on Mon Jan 23, 2012 12:38 am, edited 1 time in total.

User avatar
M.W.Taylor
Site Admin
Posts: 530
Joined: Sun May 29, 2011 11:45 am

Re: 3D surface modeling of a giant redwood trunk

Post by M.W.Taylor » Sun Jan 22, 2012 11:36 pm

One attachment at a time due to size.

This one is Melkor. Note the detail of the fire scars, nearby smaller trees and basal burl.

Michael
Attachments

[The extension ply has been deactivated and can no longer be displayed.]


User avatar
M.W.Taylor
Site Admin
Posts: 530
Joined: Sun May 29, 2011 11:45 am

Re: 3D surface modeling of a giant redwood trunk

Post by M.W.Taylor » Mon Jan 23, 2012 12:37 am

I finally coded a Visual Basic spreadsheet to calculate volume under these cloud sets. This version seems robust for dense clouds...see attached. Press Control-V to solve for volume with included default cloud set for Redwood Creek Giant. I left the settings in the finest increment mode. Be patient while solution is found. You'll see upating after about 30 seconds.

As the cookies are extracted, you will see the embedded chart update the new shape per height interval and slice thickness. The inner edge of the cookie is the upper diameter with outer edge being the lower diameter..The upper and lower part of the cookie are orthogonal and homothetic due to being the same shape and parallel. This is the crux of the theory of this volume solving method for free forms. No radii modeled here or used for this volume calculation. The tree trunk is looked at differently in this method. A full write-up will be posted next month on this new type of volume calculation.
volumesolver.JPG
Warning: This software is slow due to all the test output columns. If you leave them in place you will learn more about the program. Input columns A,B,C must use a dense cloud set or you will get overestimation.

For the lower cookies of Redwood Creek Giant's lower trunk you can clearly see where a tape-wrap would hang in space over parts of the trunk and cause over-estimate of volume. This incremental computerized solution captures all those nooks and crannies that a tape-wrap or relaskop would miss.

Michael Taylor
WNTS VP
Last edited by M.W.Taylor on Sat Jan 28, 2012 3:46 pm, edited 1 time in total.

User avatar
dbhguru
Posts: 4500
Joined: Mon Mar 08, 2010 9:34 pm

Re: 3D surface modeling of a giant redwood trunk

Post by dbhguru » Mon Jan 23, 2012 8:42 am

Michael,

Outstanding! And thanks for opening the VBA code up for us. You've succeeded in coding the solution in a remarkably few number of lines. I look forward to digging into the code. All familiar stuff with a spectacular outcome.

Bob
Robert T. Leverett
Co-founder, Native Native Tree Society
Co-founder and President
Friends of Mohawk Trail State Forest
Co-founder, National Cadre

User avatar
M.W.Taylor
Site Admin
Posts: 530
Joined: Sun May 29, 2011 11:45 am

Re: 3D surface modeling of a giant redwood trunk

Post by M.W.Taylor » Mon Jan 23, 2012 1:05 pm

Bob,

I was surprised at how few lines it took to do the task. Most of the code is for other tasks. The volume solver piece of code contains a quintuple nested "do loop". That's a first in my limited code programming experience. The volume solver is the last subroutine on the list. The first macro is "deleterows" which is a range noise filter utility. To use set xmin-xmax,ymin-yman,zmin-zmax and then run the macro to delete all rows of the XYZ cloud table that have a point outside that range. You can also draw a chart of the points....colume A vs. B for overhead view or plot B vs. C for side trunk view. Use mouse button to hover over outlier point you see outside trunk until arrows appear. Then drag the point away from the cloud from into a far out of rage "cage" area for deletion during the "Deleterows" subroutine. You can manually delete these outliers from the tables, but I find it much faster to drag the outlier points with mouse into an "out of range cage" area then manually find and delete.

The "addrows" subroutine extracts cookies from the trunk form at desired height intervals. To use this utility set the Zcookie text box to desired height and Thickness box should also have a value. I recommend using the preloaded default example for the given cloud set from Redwood Creek Giant. Press Control-C. The cookie will then be extracted and displayed on the lower chart.

Also remember this spreadsheet from my Excel97 and only allows 65,000 columns so I am only using about 1/3 of the available cloud points for the Redwood Creek Giant cloud set. If you have Excel2007 or later you can use 1 million rows so that increases the potential # of clouds points processed by 15x. If you have Excel2007 or later I would recommend extracting the other 130k XYZ cloud points from the PLY graphics file I attached. This will make the extracted cookies 3 times denser and hence volume calculation even better.

The "adjustxyz" macro recenters the X,Y,Z axis. There is no input box for this. You'll need to manually edit the Visual Basic macro and change the X,Y and Z values from 0 to desired off-set. Then run macro from tools menu. If cloud sets are imported with origin not at 0,0,0 you will need to re-center cloud set with "adjustxyz" or redefine origin in text boxes, otherwise calculation will be 100% wrong.

The "Volume" macro is the volume solver. In a nutshell here is how it works:

1)Extracts cookies from starting height point to ending point from the entire cloud set, but bound by range set in text boxes.

2) Rayangle is set and the Min and Max horizontal distance magnitude between origin and each XYZ point is calculated. Each Min and Mac point within the range is accepted and stored into radmin(10000) and radmax(10000). For default example the ray angle is set to 1 degree so this means the first scan ray finds all point furthest and closest to user define origin (default 0,0,0) for each 1 degrees from 0...all the way to 360. That would be 360 scan rays to find points. If scan ray is 10 degrees then that wouuld be 36 rays per cookie. The finer the scan ray, the finer the volume calculation.

3) once the rays are constructed between origin and inside points and outside points, the software then constructs all those ray projections into triangles with sides S1,S2 and S3 just like in your polygon area formula. Using the formula from your spreadsheet, I calculate all the little sub-triangle areas per cookie. The process can be seen in the output boxes. For a ray angle of 1, the polygon that forms the cookie would be partitioned into 360 small triangles. For ray angle 10 degree the polygon would be fitted with 36 triangles. The smallest ray angle this software version will accept is 1 degree.

Millions of processes are taking place in this code. It's slow but it works. I coded the routines so that the output goes into the cells for each working variable. This is for testing to determine how well the software is modeling the polygon. It works well for dense clouds (hundreds-thousands or more per cookie). If your cloud set is not dense enough the sub-areas get choppy and volume over-estimation may occur.

Michael

User avatar
Don
Posts: 1569
Joined: Tue Mar 09, 2010 12:42 am

Re: 3D spacial modeling of a giant redwood trunk

Post by Don » Wed Jan 25, 2012 5:36 pm

Michael-
Thinking about how a picture is worth but a thousand words...a 3D model is only partially complete after 4000 'hits'. Impressive implementation of what was not too recently little more than a conceptualisation!
My question? Knowing that you can only do one "face" at a time (or in the case of brush around the tree, part of a face), that several more are needed to 'get a wrap', my question is how do you "edge match" (to borrow a phrase from photogrammetry, albeit in 2D)? Do you find 'hits' that occupy the same space exactly, or is their a 'judgment' call involved?
-Don


M.W.Taylor wrote:
Larry Tucei wrote:Wow, That is an amazing graft you created. It must take many hours to do such a detailed mapping. Way cool! Larry
Hi Larry,

I download my data from the Impulse200LR and MapStar encoder directly to a field PC through serial data cables. I average about 1,000 data points per hour. This map of the first 20 feet of Drury's trunk took me about 4 hours due to clutter around the tree. I had to move around a lot to find clear views and that took some time. To completely map the tree this way will probably take at least 10 more hours of field time. There is just so much surface area to map on this behemoth. This tree appears to be 16' diameter at 100' off the ground. It's a massive wall of wood.

Michael Taylor
Don Bertolette - President/Moderator, WNTS BBS
Restoration Forester (Retired)
Science Center
Grand Canyon National Park

BJCP Apprentice Beer Judge

View my Alaska Big Tree List Webpage at:
http://www.akbigtreelist.org

User avatar
Don
Posts: 1569
Joined: Tue Mar 09, 2010 12:42 am

Re: 3D spacial modeling of a giant redwood trunk

Post by Don » Wed Jan 25, 2012 5:47 pm

Matt-
Back when I was young single and fearless, I was a "coke knocker" and charged with chinking away at coke that built up inside the vessels, perhaps like the ones you spoke of...my prone to daydreaming mind had me thinking of the rotating laser prism, first used to determine the coke buildup, second to laserblast away the coke, and then third to quality control check for 'cracking/bulging'. My how time has raced along!
-don



fooman wrote:Hi Michael,

The laser scanner we use is not a Lidar scanner - it does not use a reference position to generate the point cloud. It provides self positioning data via reflective spots that are randomly positioned on the scanned object. Once these points are registered the laser beam is scanned across the object, much like a spray can, "painting" the scanning beam across the object. This generates reasonably high resolution data (sub-millimetric) very rapidly - maybe a million points in an hour or so. But not really suitable for a large tree.

Another scanner I came across used self positioning in the magnetic field as some sort of golbal reference, but it could not scan metallic objects, so wasn't much use for us.

I've just remembered that our inspection division used to scan the inside of delayed coker drums (large refinery vessels - maybe 20-30 m tall, 4-5 m in diameter) using a laser process - a rotating prism was used to scan a beam around the inside circumference of the vessel, while being dropped down the axis, to pick up cracking/bulging in the vessel wall.

I do think structured light scanning is a real possibility for large trees - all that is needed is a reference dimension (e.g. taped girth) or length between two features on the trunk, a method to project a light pattern (a large projector at night?), and two cameras recording the image at a known baseline plus the software. The guys at the company I referred to in my earlier post were just using normal cameras mounted on tripods a known distance apart. The resolution of a scanned tree would be lower than the smaller objects normally scanned (e.g. people) but I guess +/- 1 inch would be ok for volume, rather than +/- 1 mm?

Cheers,
matt
Don Bertolette - President/Moderator, WNTS BBS
Restoration Forester (Retired)
Science Center
Grand Canyon National Park

BJCP Apprentice Beer Judge

View my Alaska Big Tree List Webpage at:
http://www.akbigtreelist.org

Post Reply

Return to “Measurement and Dendromorphometry”