qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.48k stars 2.99k forks source link

SAGA openCV and processing tools. #27367

Closed qgib closed 5 years ago

qgib commented 6 years ago

Author Name: Patrice Carbonneau (Patrice Carbonneau) Original Redmine Issue: 19540 Affected QGIS version: 3.2.1 Redmine category:processing/saga


None of the open CV processing tools seem to work. I have read that they do not function as part of a modeller, but for me they don't even work outside any sortt of batching mode. There are doubts about usage, notably about the 'Class Identifier' parameter. But there is no documentation (even in 2.18 where this tool did exist) and the help button has a dead link. I treid a little csv file with the name of the classes. Error message is the same for all openCV tools. Main error seems to be about selecting a library? I notice that QGIS installs SAGA 2.3.2, but open CV tools are not available in that version of SAGA, only much later.

{ '1SE_RULE' : True, 'ACTIVE_VARS' : 0, 'CLASSES' : 'C:/Users/patca/AppData/Local/Temp/processing_7c97d6ddd9dd4aeb9964c897acb1336d/b70c949afe684f9694a842a7e5d829f0/CLASSES.sdat', 'FEATURES' : '', 'MAX_CATEGRS' : 10, 'MAX_DEPTH' : 10, 'MIN_SAMPLES' : 2, 'NORMALIZE' : False, 'REG_ACCURACY' : 0.01, 'TRAIN_AREAS' : 'E:\Deep Riverscapes\StMarg\Qtest2_class.shp', 'TRAIN_CLASS' : 'D:/DeepRiverscapes/CLS_ID.csv', 'TRUNC_PRUNED' : True }

imagery_opencv "Random Forest Classification (OpenCV)" -NORMALIZE false -TRAIN_AREAS "E:\Deep Riverscapes\StMarg\Qtest2_class.shp" -TRAIN_CLASS "C:/Users/patca/AppData/Local/Temp/processing_7c97d6ddd9dd4aeb9964c897acb1336d/4743f3c5d45043c3baf34be4e4fd9366/TRAIN_CLASS.shp" -MAX_DEPTH 10 -MIN_SAMPLES 2 -MAX_CATEGRS 10 -1SE_RULE true -TRUNC_PRUNED true -REG_ACCURACY 0.01 -ACTIVE_VARS 0 -CLASSES "C:/Users/patca/AppData/Local/Temp/processing_7c97d6ddd9dd4aeb9964c897acb1336d/b70c949afe684f9694a842a7e5d829f0/CLASSES.sdat"

C:\PROGRA~1\QGIS3~1.2\bin>set SAGA=C:/PROGRA~1/QGIS3~1.2/apps\saga-ltr

C:\PROGRA~1\QGIS3~1.2\bin>set SAGA_MLB=C:/PROGRA~1/QGIS3~1.2/apps\saga-ltr\modules

C:\PROGRA~1\QGIS3~1.2\bin>PATH=C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\numpy\core;C:\PROGRA~1\QGIS3~1.2\apps\qgis\bin;C:\PROGRA~1\QGIS3~1.2\apps\Python36;C:\PROGRA~1\QGIS3~1.2\apps\Python36\Scripts;C:\PROGRA~1\QGIS3~1.2\apps\qt5\bin;C:\PROGRA~1\QGIS3~1.2\apps\Python27\Scripts;C:\PROGRA~1\QGIS3~1.2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem;C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\pypiwin32_system32;;C:/PROGRA~1/QGIS3~1.2/apps\saga-ltr;C:/PROGRA~1/QGIS3~1.2/apps\saga-ltr\modules

C:\PROGRA~1\QGIS3~1.2\bin>saga_cmd imagery_opencv "Random Forest Classification (OpenCV)" -NORMALIZE false -TRAIN_AREAS "E:\Deep Riverscapes\StMarg\Qtest2_class.shp" -TRAIN_CLASS "C:/Users/patca/AppData/Local/Temp/processing_7c97d6ddd9dd4aeb9964c897acb1336d/4743f3c5d45043c3baf34be4e4fd9366/TRAIN_CLASS.shp" -MAX_DEPTH 10 -MIN_SAMPLES 2 -MAX_CATEGRS 10 -1SE_RULE true -TRUNC_PRUNED true -REG_ACCURACY 0.01 -ACTIVE_VARS 0 -CLASSES "C:/Users/patca/AppData/Local/Temp/processing_7c97d6ddd9dd4aeb9964c897acb1336d/b70c949afe684f9694a842a7e5d829f0/CLASSES.sdat" Error: select a library



SAGA Version: 2.3.2 (64 bit)

69 loaded tool libraries (640 tools):

type -h or --help for further information

C:\PROGRA~1\QGIS3~1.2\bin>exit Execution completed in 6.62 seconds Results: {'CLASSES': 'C:/Users/patca/AppData/Local/Temp/processing_7c97d6ddd9dd4aeb9964c897acb1336d/b70c949afe684f9694a842a7e5d829f0/CLASSES.sdat'}

Loading resulting layers The following layers were not correctly generated.

You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

qgib commented 5 years ago

Author Name: Alexander Bruy (@alexbruy)


Please test with master/3.4. If issue persist please provide test data and steps to reproduce.


qgib commented 5 years ago

Author Name: Alexander Bruy (@alexbruy)