m.nviz.image - simulating aerial (nadir-looking) images

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

m.nviz.image - simulating aerial (nadir-looking) images

Carlos Henrique Grohmann de Carvalho-2
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?)


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:



Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil
- Digital Terrain Analysis | GIS | Remote Sensing - 

Can’t stop the signal.

grass-user mailing list
[hidden email]