Closed oleg-alexandrov closed 10 months ago
Hi, I encountered similar issue. What is the best way to solve this issue using the latest version of ASP
in linux machine? Please help me!
To be more specific, I am trying to process the KH-9
imagery. I tried to run historical_helper.py
command as below. But the library always generate the following error,
I think in the latest ASP I stopped shipping the convert tools, so it uses the one from your system (you can try to do 'which convert' to check).
Your error seems to be explained here: http://www.imagemagick.org/discourse-server/viewtopic.php?t=34044.
If no luck, you can try to maybe first scale down an image with:
gdal_translate -r average -outsize 50% 50% -co compress=lzw -co TILED=yes -co INTERLEAVE=BAND -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 input.tif output.tif
On Tue, May 9, 2023 at 11:08 AM Tek Kshetri @.***> wrote:
Hi, I encountered similar issue. What is the best way to solve this issue using the latest version of ASP in linux machine? Please help me!
[image: image] https://user-images.githubusercontent.com/39838116/237182704-bf68655d-7fba-44ed-a506-1be5314c805f.png
— Reply to this email directly, view it on GitHub https://github.com/NeoGeographyToolkit/StereoPipeline/issues/384#issuecomment-1540636649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKDU3HHLYGK5GAC7XOZ553XFKB2RANCNFSM6AAAAAAQI5KLL4 . You are receiving this because you authored the thread.Message ID: @.***>
Thank you very much for the reply. I had used the 3.2.0
version. For now, I have commented out the few lined in /etc/ImageMagick-6/policy.xml
file as mentioned here and it resolved my problem.
Thank you very much for your contribution to this open source package. It is very useful package for processing the KH
products.
Hope it works for you. Our support for KH was an experiment and we did not have time to refine it.
The just-released ASP 3.3.0 software no longer ships the convert tool with the zipped binaries. I just added documentation for how to install it, if needed.
The conda ASP package however has a 'convert' tool, but that is the wrong one, it is a helper program for a third party-library named "embree". That we cannot control.
So, in either case, it is best the user installs the convert tool separately, in a different environment. That is now documented here: https://stereopipeline.readthedocs.io/en/latest/tools/historical_helper.html
I also modified the historical_helper.py script to check for this tool, and print a message if the tool does not exist or the wrong tool is found, and suggesting installing it with conda.
These changes are after the release, they are available with the latest build at https://github.com/NeoGeographyToolkit/StereoPipeline/releases
The convert tool shipped with ASP can't do even something as simple as:
convert input.jpg output.jpg
To be looked into, when there is time. For now, it is suggested to use conda to fetch a functioning version of it, in a new environment, with the command:
conda install -c conda-forge imagemagick
and set the path to that one before invoking historical_helper.py or some other tool which needs it. If historical_helper.py refuses to use the new path and uses the old one, some lines on top of that script which set the path should be commented out, and then it will hopefully invoke the right tool.