Exemplo n.º 1
0
def create_mesh(path):

    gsf_pings = utils.parse_or_load_gsf(path)
    mbes_pings = gsf_data.convert_pings(gsf_pings)
    V, F, bounds = mesh_map.mesh_from_pings(mbes_pings, 0.5)

    return V, F, bounds
Exemplo n.º 2
0
def generate_or_load_height_map(path, resolution):

    if os.path.exists("height_map.npz"):
        #height_map = gsf_data.gsf_mbes_ping.read_data("gsf_cache.cereal")
        height_map = np.load("height_map.npz")["height_map"]
    else:
        gsf_pings = utils.parse_or_load_gsf(path)
        mbes_pings = gsf_data.convert_pings(gsf_pings)
        m = mesh_map.bathy_map_mesh()
        height_map, bounds = m.height_map_from_pings(mbes_pings, resolution)
        #gsf_data.write_data(gsf_pings, "gsf_cache.cereal")
        np.savez("height_map.npz", height_map=height_map)
    return height_map
Exemplo n.º 3
0
#!/usr/bin/python

from auvlib.data_tools import std_data, gsf_data, utils
from auvlib.bathy_maps import mesh_map
import sys
import numpy as np

gsf_pings = utils.parse_or_load_gsf(sys.argv[1])
mbes_pings = gsf_data.convert_pings(gsf_pings)
V, F, bounds = mesh_map.mesh_from_pings(mbes_pings, 0.5)

height_map, bounds = mesh_map.height_map_from_pings(mbes_pings, 0.2)
#mesh_map.show_height_map(height_map)

R, G, B = mesh_map.height_map_to_texture(height_map)

mesh_map.show_textured_mesh(V, F, R, G, B, bounds)

#mesh_map.show_mesh(V, F)

Exemplo n.º 4
0
#!/usr/bin/env python
from auvlib.data_tools import std_data, gsf_data
from auvlib.bathy_maps import draw_map
import sys

gsf_pings = gsf_data.gsf_mbes_ping.parse_folder(
    sys.argv[1])  # parse folder of gsf data
mbes_pings = gsf_data.convert_pings(gsf_pings)  # convert to std_data pings

d = draw_map.BathyMapImage(mbes_pings, 500,
                           500)  # create a bathymetry height map
d.draw_height_map(mbes_pings)  # draw the height map
d.draw_track(mbes_pings)  # draw the track of the vehicle
d.write_image("height_map.png")  # save the height map to "height_map.png"