[GRASS-user] m.nviz.image - simulating aerial (nadir-looking) images
Carlos Henrique Grohmann de Carvalho
carlos.grohmann at gmail.com
Thu Jul 26 09:14:10 PDT 2018
Hello all
Now that m.nviz.image is working (thanks devs!), I'm trying to simulate
aerial (UAV) images.
Is this possible?
Playing around with the parameters, I can't seem to get a nadir-looking
image. If I set the height of the 'camera' to something like 500 meters
(it's a coastal area, elevations are all below 40m), the resulting image
looks like a nadir observation, but as the height becomes smaller, say 120
meters, the surface is tilted (much like in Google Earth) and the
observation is an oblique view of the surface.
I tried setting the 'focus' parameter to the central coordinate of the
region, but the result is the same.
One issue that might be causing some confusion in my head is that some
parameters expect 'model coordinates' (0-1), while others expect map
units...
Another point is the 'perspective' param. What does it mean? Should I use
the field of view of my real camera here?
This is the region:
projection: 1 (UTM)
zone: -22
datum: wgs84
ellipsoid: wgs84
north: 6900503
south: 6900383
west: 732294
east: 732474
nsres: 0.5
ewres: 0.5
rows: 240
cols: 360
cells: 86400
center point:
732384.0, 6900443.0
I want the view to be on the center of the image, so position=0.5,0.5
(right?)
set focus to center point (in map units, from SW corner - corner of what?
the raster? the region?)
focus=90.0,60.0,11.72
This is the full command (in python)
>>> grass.run_command('m.nviz.image', elevation_map=elev, color_map=shade,
mode='fine', resolution_fine='1', \
... style='surface', position='0.50,0.50', height='120', focus=foc,
perspective=cam_fov, size=img_size, \
... format='ppm', output='test', overwrite=True, verbose=True)
For testing, this are links to the 'elev' and 'shade' rasters:
https://www.dropbox.com/s/ou0ft6srs9w7e6t/elev.tif?dl=0
https://www.dropbox.com/s/urcf4m60rvtsi4f/shade.tif?dl=0
thanks
Carlos
--
Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil
- Digital Terrain Analysis | GIS | Remote Sensing -
http://carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572
________________
Can’t stop the signal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180726/abdd6ab1/attachment.html>
More information about the grass-user
mailing list