MISS3D / s2p

This repository is not maintained, please use https://github.com/centreborelli/s2p instead.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Utilities/Utilities.cpp:17:17: fatal error: png.h: File o directory non esistente

Delios82 opened this issue · comments

Error during installation "pip install s2p"

Installing collected packages: plyfile, ransac, s2p
Running setup.py install for plyfile ... done
Running setup.py install for ransac ... done
Running setup.py install for s2p ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-myhPgj/s2p/setup.py'"'"'; file='"'"'/tmp/pip-install-myhPgj/s2p/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-6dlDHD/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-myhPgj/s2p/
Complete output (93 lines):
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/s2p
copying s2p/sift.py -> build/lib/s2p
copying s2p/rectification.py -> build/lib/s2p
copying s2p/config.py -> build/lib/s2p
copying s2p/block_matching.py -> build/lib/s2p
copying s2p/evaluation.py -> build/lib/s2p
copying s2p/geographiclib.py -> build/lib/s2p
copying s2p/estimation.py -> build/lib/s2p
copying s2p/init.py -> build/lib/s2p
copying s2p/visualisation.py -> build/lib/s2p
copying s2p/masking.py -> build/lib/s2p
copying s2p/initialization.py -> build/lib/s2p
copying s2p/cli.py -> build/lib/s2p
copying s2p/common.py -> build/lib/s2p
copying s2p/rasterization.py -> build/lib/s2p
copying s2p/fusion.py -> build/lib/s2p
copying s2p/pointing_accuracy.py -> build/lib/s2p
copying s2p/parallel.py -> build/lib/s2p
copying s2p/rpc_utils.py -> build/lib/s2p
copying s2p/rpc_model.py -> build/lib/s2p
copying s2p/triangulation.py -> build/lib/s2p
mkdir -p bin
mkdir -p lib
make -j -C c/homography
make[1]: Entering directory /tmp/pip-install-myhPgj/s2p/c/homography' g++ -march=native -O3 gdal-config --cflags-std=c++11 -c -o main.o main.cpp g++ -march=native -O3gdal-config --cflags-std=c++11 -c -o LibImages/LibImages.o LibImages/LibImages.cpp g++ -march=native -O3gdal-config --cflags-std=c++11 -c -o Utilities/Utilities.o Utilities/Utilities.cpp g++ -march=native -O3gdal-config --cflags-std=c++11 -c -o Utilities/Memory.o Utilities/Memory.cpp g++ -march=native -O3gdal-config --cflags-std=c++11 -c -o Utilities/Parameters.o Utilities/Parameters.cpp g++ -march=native -O3gdal-config --cflags-std=c++11 -c -o Utilities/Time.o Utilities/Time.cpp g++ -march=native -O3gdal-config --cflags-std=c++11 -c -o LibHomography/Homography.o LibHomography/Homography.cpp g++ -march=native -O3gdal-config --cflags-std=c++11 -c -o LibHomography/Splines.o LibHomography/Splines.cpp g++ -o homography main.o LibImages/LibImages.o Utilities/Utilities.o Utilities/Memory.o Utilities/Parameters.o Utilities/Time.o LibHomography/Homography.o LibHomography/Splines.o gdal-config --libsmake[1]: Leaving directory/tmp/pip-install-myhPgj/s2p/c/homography'
cp c/homography/homography bin
make -j -C c/sift
make[1]: Entering directory /tmp/pip-install-myhPgj/s2p/c/sift' g++ -march=native -O3 -fPIC -c -o LibImages/LibImages.o LibImages/LibImages.cpp g++ -march=native -O3 -fPIC -c -o LibSSE/LibSSE.o LibSSE/LibSSE.cpp g++ -march=native -O3 -fPIC -c -o LibSift/KeyPoint.o LibSift/KeyPoint.cpp g++ -march=native -O3 -fPIC -c -o LibSift/LibSift.o LibSift/LibSift.cpp g++ -march=native -O3 -fPIC -c -o LibSift/Octave.o LibSift/Octave.cpp g++ -march=native -O3 -fPIC -c -o LibSift/ScaleSpace.o LibSift/ScaleSpace.cpp g++ -march=native -O3 -fPIC -c -o Utilities/Memory.o Utilities/Memory.cpp g++ -march=native -O3 -fPIC -c -o Utilities/Parameters.o Utilities/Parameters.cpp g++ -march=native -O3 -fPIC -c -o Utilities/Time.o Utilities/Time.cpp g++ -march=native -O3 -fPIC -c -o Utilities/Utilities.o Utilities/Utilities.cpp g++ -march=native -O3 -fPIC -c -o sift4ctypes.o sift4ctypes.cpp Utilities/Utilities.cpp:17:17: fatal error: png.h: File o directory non esistente #include <png.h> ^ compilation terminated. make[1]: *** [Utilities/Utilities.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory /tmp/pip-install-myhPgj/s2p/c/sift'
make: *** [sift] Error 2
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-myhPgj/s2p/setup.py", line 69, in
""")
File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 53, in run
return _install.run(self)
File "/usr/lib64/python2.7/distutils/command/install.py", line 563, in run
self.run_command('build')
File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib64/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-install-myhPgj/s2p/setup.py", line 27, in run
subprocess.check_call("make", shell=True)
File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'make' returned non-zero exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-myhPgj/s2p/setup.py'"'"'; file='"'"'/tmp/pip-install-myhPgj/s2p/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-6dlDHD/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Hello @Delios82, thank you for reporting this issue. You need to install libpng development files, e.g sudo apt-get install libpng-dev on Ubuntu.

thanks for your reply.
I am a beginner. At the end of the script I've attached, where can I find the height values?
the 2 files rpc_01.xml and rpc_02.xml how are they calculated?

The rpc files are a parameter of the method. But for most providers theor information is extractes from the image itself.

thanks for your reply.
I have one last question, given your availability, you can use "rpb" files instead of "rpc" files, or you could tell me a way to convert rpb to rpc. Thank you very much for the availability