kopia lustrzana https://github.com/OpenDroneMap/ODM
rodzic
fd7cd17fe8
commit
12a3fe1a07
|
@ -21,7 +21,7 @@ libexiv2-dev liblas-bin python-matplotlib libatlas-base-dev swig2.0 python-wheel
|
||||||
RUN apt-get remove libdc1394-22-dev
|
RUN apt-get remove libdc1394-22-dev
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
RUN pip install setuptools
|
RUN pip install setuptools
|
||||||
RUN pip install -U PyYAML exifread gpxpy xmltodict catkin-pkg appsettings https://github.com/OpenDroneMap/gippy/archive/v0.3.9.tar.gz loky scipy shapely numpy pyproj psutil
|
RUN pip install -U PyYAML exifread gpxpy xmltodict catkin-pkg appsettings gippy loky scipy shapely numpy pyproj psutil
|
||||||
|
|
||||||
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
|
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
|
||||||
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
||||||
|
|
|
@ -19,7 +19,7 @@ libexiv2-dev liblas-bin python-matplotlib libatlas-base-dev swig2.0 python-wheel
|
||||||
RUN apt-get remove libdc1394-22-dev
|
RUN apt-get remove libdc1394-22-dev
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
RUN pip install setuptools
|
RUN pip install setuptools
|
||||||
RUN pip install -U PyYAML exifread gpxpy xmltodict catkin-pkg appsettings https://github.com/OpenDroneMap/gippy/archive/v0.3.9.tar.gz loky scipy shapely numpy pyproj psutil
|
RUN pip install -U PyYAML exifread gpxpy xmltodict catkin-pkg appsettings gippy loky scipy shapely numpy pyproj psutil
|
||||||
|
|
||||||
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
|
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
|
||||||
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
||||||
|
|
|
@ -101,13 +101,13 @@ def gap_fill(filenames, fout, interpolation='nearest'):
|
||||||
|
|
||||||
filenames = sorted(filenames)
|
filenames = sorted(filenames)
|
||||||
|
|
||||||
imgs = gippy.GeoImages(filenames)
|
imgs = map(gippy.GeoImage, filenames)
|
||||||
nodata = imgs[0][0].NoDataValue()
|
nodata = imgs[0][0].nodata()
|
||||||
arr = imgs[0][0].Read()
|
arr = imgs[0][0].read()
|
||||||
|
|
||||||
for i in range(1, imgs.size()):
|
for i in range(1, len(imgs)):
|
||||||
locs = numpy.where(arr == nodata)
|
locs = numpy.where(arr == nodata)
|
||||||
arr[locs] = imgs[i][0].Read()[locs]
|
arr[locs] = imgs[i][0].read()[locs]
|
||||||
|
|
||||||
# interpolation at bad points
|
# interpolation at bad points
|
||||||
goodlocs = numpy.where(arr != nodata)
|
goodlocs = numpy.where(arr != nodata)
|
||||||
|
@ -115,10 +115,10 @@ def gap_fill(filenames, fout, interpolation='nearest'):
|
||||||
arr[badlocs] = griddata(goodlocs, arr[goodlocs], badlocs, method=interpolation)
|
arr[badlocs] = griddata(goodlocs, arr[goodlocs], badlocs, method=interpolation)
|
||||||
|
|
||||||
# write output
|
# write output
|
||||||
imgout = gippy.GeoImage(fout, imgs[0])
|
imgout = gippy.GeoImage.create_from(imgs[0], fout)
|
||||||
imgout.SetNoData(nodata)
|
imgout.set_nodata(nodata)
|
||||||
imgout[0].Write(arr)
|
imgout[0].write(arr)
|
||||||
fout = imgout.Filename()
|
fout = imgout.filename()
|
||||||
imgout = None
|
imgout = None
|
||||||
|
|
||||||
log.ODM_INFO('Completed gap-filling to create %s in %s' % (os.path.relpath(fout), datetime.now() - start))
|
log.ODM_INFO('Completed gap-filling to create %s in %s' % (os.path.relpath(fout), datetime.now() - start))
|
||||||
|
|
Ładowanie…
Reference in New Issue