Bob-O-Rama / cvfind

Project cleanup and cpfind alternative for Hugin
https://bob-o-rama.smugmug.com/CvFind-Project/i-5GtztJX
Apache License 2.0
6 stars 0 forks source link

Packaging cvfind for Windows / Mac #10

Open Bob-O-Rama opened 11 months ago

Bob-O-Rama commented 11 months ago

I do not as yet have a windows based build environment to make an exe or installer. Basically this should be "hello world" with OpenCV being linked in - its literally one big .cpp file. Same ask for Mac. There are a few *nix dependencies relating to file name handling ( in the absence of Boost and C++17 ) and a couple thread management calls which likely can be omitted.

BarsMonster commented 8 months ago

Alternative might be running it under WSL2. I am trying to get it working now. Painful but possible with existing binaries.

BarsMonster commented 8 months ago

Update: Final result - no dice running pre-built OpenSUSE binaries in Windows. Apparently due to opencv version mismatch - it segfaults when starting to do real work.

Bob-O-Rama commented 8 months ago

Before abandoning that approach entirely can you see if cvfind -h and cvfind --test can be executed without crashing? The --test option tries to bind to openvc libraries in a trivial sense. If you can even load cvfind at all without linker errors suggests it "thinks" the proper libraries are there. Try also opencv_version -v which is an executable that should be present when openvc is installed. Posting the results may point at something.

If you think it crashes after some deliberation... you can add --log --alignlog --debug --loglevel 9 to the command line, this will spew forth a lot of output and also try to save various .log files to the CWD. You could just be seeing a garden variety bug unrelated to WSL.

BarsMonster commented 8 months ago

--log --alignlog --debug --loglevel 9

Yes, it only starts to run because I "made" right libraries with "ln", there was clearly opencv version mismatch. So static linking would have likely helped.

cvfind -h works cvfind --test passes

Running against actual .pto crashes:

INFO: Job: 000007 Image Pair 0007 ( alignImage( 0005 --> 0006 ):  INFO: alignImages() using global defaults.
000011 Image Pair 0000 ) --> 0005 ( /mnt/c/Users//Documents/ToupView/20240322104857646.tif )
 Image Pair 0001 ( /mnt/c/Users//Documents/ToupView/20240322104910808.tif )
 INFO: Job: 000002 Image Pair 0002 (  Image Pair 0010 ( alignImage( 0005 --> 0006 ):  INFO: Detector Mask: (0,0) - (0,0) LR: 0 TB: 0 Axis: 0/mnt/c/Users/MDocuments/ToupView/20240322104837943.tif
 ) --> 0003 ( /mnt/c/Users//Documents/ToupView/20240322104846042.tif )
0001 ( alignImage( 0002 --> 0003 ):  INFO: alignImages() using global defaults.
/mnt/c/Users//Documents/ToupView/20240322104926970.tif ) --> 0011 ( /mnt/c/Users//Documents/ToupView/20240322104932105.tif )
alignImage( 0004 --> 0006 ):  INFO: Detector Mask: (0,0) - (0,0) LR: 0 TB: 0 Axis: 0
/mnt/c/Users//Documents/ToupView/20240322104910808.tif ) --> 0008 ( /mnt/c/Users//Documents/ToupView/20240322104915661.tif )
Segmentation fault