Forum

Author Topic: Render Elevation into Camera  (Read 565 times)

FabianN

  • Newbie
  • *
  • Posts: 5
    • View Profile
Render Elevation into Camera
« on: September 29, 2021, 10:31:55 AM »
What is the most efficient way to render the elevation model (chunk.elevation) into a specific camera view?
I would like to get an absolute elevation value for each pixel in the respective camera(s).

Thank you!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13295
    • View Profile
Re: Render Elevation into Camera
« Reply #1 on: September 29, 2021, 12:07:21 PM »
Hello FabianN,

I'm not sure that there is an efficient way to do that.

What comes to my mind is a slow approach, which would send the ray through each pixel of the image and camera center, intersect it with the surface, get the altitude value of the intersection point and put it to the newly created single band floating point raster of the same resolution as the original image.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Paulo

  • Hero Member
  • *****
  • Posts: 804
    • View Profile
Re: Render Elevation into Camera
« Reply #2 on: September 29, 2021, 01:07:37 PM »
Hi Alexey,

You are quite right, it is very slow. I am trying to do this approach  on one 20 Mpix image and it takes a lot of time to loop thru the 20 million pixel positions on image and find their intersection with surface... so it is not very  efficient....

Best Regards,

Paul Pelletier

FabianN

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Render Elevation into Camera
« Reply #3 on: September 29, 2021, 02:40:56 PM »
Hi Alexey,

Thanks for answering.
I was afraid you suggest it this way. It is indeed not an option for my task - too many high resolution images.

Maybe there are also other applications that would benefit from having the possibility to render elevation (or even a 3-band image with geographic coordinates) for each pixel in a camera view.

Like:
chunk.model.renderCoordinateImage (for xyz)
chunk.elevation.renderImage (for z)
chunk.orthomosaic.renderImage (for xy)
 :D