Forum

Author Topic: Process chunk depending on bounding box's size  (Read 2056 times)

Thibaud Capra

  • Full Member
  • ***
  • Posts: 101
  • Master Student in Geodetic Engineering & Surveying
    • View Profile
    • INSA de Strasbourg, Topography Engineering (French)
Process chunk depending on bounding box's size
« on: April 26, 2017, 03:41:27 PM »
Hello everyone

I'm currently working on UAV-based models where I process subparts of a global point cloud. Problem is, if the bounding box is too small, I may have issues processing it (DPC, Meshing etc.) because my photo coverage is insufficient.

Since the scene's coverage is constant (one photo every X meters), I determined the minimal surface for the bounding box to have enough photos in it to process things properly : 500 m².

I figured my condition would be something like
(I also loosen the region size until the bounding box is big enough):

Code: [Select]
for chunk in doc.chunks
    region = chunk.region
    box_x = chunk.region.size.x
    box_y = chunk.region.size.y
    box_z = chunk.region.size.z
    Box_surf = box_x * box_y
    while Box_surf < 500: #m²
        region.size = 1.1 * region.size
        chunk.region = region
        box_x = chunk.region.size.x
        box_y = chunk.region.size.y
        box_z = chunk.region.size.z
        Box_surf = box_x * box_y
    # Densify
    # Mesh etc.

How can I get the size in meters?
Any way to make it cleaner?

Thanks in advance.
Best regards.
--
Thibaud CAPRA
Master Student in Geodetic Engineering, Cartography & Surveying
Master Thesis in Automated Processing of UAV-based Photogrammetric Data (ResearchGate Link)
INSA de Strasbourg, FRANCE
--

Thibaud Capra

  • Full Member
  • ***
  • Posts: 101
  • Master Student in Geodetic Engineering & Surveying
    • View Profile
    • INSA de Strasbourg, Topography Engineering (French)
Re: Process chunk depending on bounding box's size
« Reply #1 on: April 26, 2017, 04:04:16 PM »
For the record, I printed the values of my variables:

Code: [Select]
    box_x = chunk.region.size.x
    box_y = chunk.region.size.y
    box_z = chunk.region.size.z

And they're all around 1 or 0.8...
Best regards.
--
Thibaud CAPRA
Master Student in Geodetic Engineering, Cartography & Surveying
Master Thesis in Automated Processing of UAV-based Photogrammetric Data (ResearchGate Link)
INSA de Strasbourg, FRANCE
--