fbergama / wass

WASS (Waves Acquisition Stereo System) is an optimized stereo processing pipeline for sea waves 3D reconstruction.
GNU General Public License v3.0
40 stars 13 forks source link

Compilation of WASS on Windows #25

Open nguyenthanhnhan280198 opened 9 months ago

nguyenthanhnhan280198 commented 9 months ago

Hello everyone.

I am trying to compile WASS on Windows but have a problem with the SBA library.

-- D:/RESEARCH_PAPER/Reconstruct_wave_surface_research/codes/wass_code/wass/src/wass_autocalibrate/../../ext/sba-1.6 CMake Error at wass_autocalibrate/CMakeLists.txt:30 (MESSAGE): SBA library not found. I've tried to compile it for you but sumething went wrong. Please manually compile SBA library and place it into D:/RESEARCH_PAPER/Reconstruct_wave_surface_research/codes/wass_code/wass/ext/sba-1.6

-- Configuring incomplete, errors occurred!

Please help me to fix this problem.

huangya17 commented 8 months ago

Hello,

According the current wass version 1.8 their website indicates you just need to download and unzip the package to the wass root dir, then install nodejs for 64 bit windows.

We manage to proceed to this point and then carry out the test pipeline all ok. But when we starts the 'prepare' step, there is no way the browser can display the correct working dir and path from the configuration file. We have double check back and forth all the setting in the worksession.js file. Cannot find any thing odd.

Any advice would be welcome.

Ya

fbergama commented 8 months ago

The web interface has become obsolete to run WASS. Please use either:

  1. wasscli
  2. run_wass.m Matlab script

Filippo

huangya17 commented 8 months ago

Thank you Filippo,

After trying the run_wass.m, I have the following erorr message:

8 stereo frames found. 8 stereo frames found. Creating D:\wass data 2023\YS input\data-dataref.ifremer.fr\stereo\YS_2017\2017-05-13_05-00-00_10Hz/output/


** RUNNING wass_prepare *****


wass_prepare v. 1.8_heads/master-0-g2233c24


[Release] Windows-10.0.19044 - MSVC, OpenCV 4.6.0

wass_prepare [error] Invalid calibration directory Error using assert component exited with non-zero return code

Error in run_wass_YS (line 172) assert( system( [ENV_SET, PREPARE_EXE, ' --workdir ', input_frames{ii}.wd, ' --calibdir ', CONFIG_DIR, ...

I have changed and checked all the directories according to my work directory of wass and the data folders. I am not sure there is a line to define the calibration folder... Any suggestions?

Kind regards,

Ya

fbergama commented 8 months ago

Yes, line 32 in run_wass.m. You have to set those values depending on where your data is stored.

huangya17 commented 8 months ago

But I have already checked my lines of data dir and work dir for wass, the error above remains.

I have also checked the / or \ slash - they should not make any difference on windows...

The error points to the matlab lines:

for ii=1:numel(input_frames) assert( system( [ENV_SET, PREPARE_EXE, ' --workdir ', input_frames{ii}.wd, ' --calibdir ', CONFIG_DIR, ' --c0 ', input_frames{ii}.Cam0, ' --c1 ', input_frames{ii}.Cam1] ) == 0, 'component exited with non-zero return code'); end

Apparently 'wass_prepare' is not able to recognise the CONFIG_DIR. But we have put all files in the config folder in the correct path:

CONFIG_DIR = 'D:\wass data 2023\YS input\data-dataref.ifremer.fr\stereo\YS_2017\2017-05-13_05-00-00_10Hz/config/' where the distortions and intrinsic xml files are stored.

DATA_ROOT = 'D:\wass data 2023\YS input\data-dataref.ifremer.fr\stereo\YS_2017\2017-05-13_05-00-00_10Hz/'

EXE_DIR = 'D:\wass_root18\wass_1.8_win32_x64/dist/bin/'

nguyenthanhnhan280198 commented 8 months ago

Yes, line 32 in run_wass.m. You have to set those values depending on where your data is stored.

Hello Filippo Bergamasco

Thank you about your source code. It is very interesting to me. I would appreciate your help.

I tried to follow your instructions, but it was not successful. First, I download the source code. Then use Matlab to run the run_wass.m. However, I can not see the location of "/dist/bin/" for EXE_DIR=[wass_dir,'/dist/bin/']; Please share the step by step for using wass.

Thank you for your time and kind consideration!

nguyenthanhnhan280198 commented 8 months ago

But I have already checked my lines of data dir and work dir for wass, the error above remains.

I have also checked the / or \ slash - they should not make any difference on windows...

The error points to the matlab lines:

for ii=1:numel(input_frames) assert( system( [ENV_SET, PREPARE_EXE, ' --workdir ', input_frames{ii}.wd, ' --calibdir ', CONFIG_DIR, ' --c0 ', input_frames{ii}.Cam0, ' --c1 ', input_frames{ii}.Cam1] ) == 0, 'component exited with non-zero return code'); end

Apparently 'wass_prepare' is not able to recognise the CONFIG_DIR. But we have put all files in the config folder in the correct path:

CONFIG_DIR = 'D:\wass data 2023\YS input\data-dataref.ifremer.fr\stereo\YS_2017\2017-05-13_05-00-00_10Hz/config/' where the distortions and intrinsic xml files are stored.

DATA_ROOT = 'D:\wass data 2023\YS input\data-dataref.ifremer.fr\stereo\YS_2017\2017-05-13_05-00-00_10Hz/'

EXE_DIR = 'D:\wass_root18\wass_1.8_win32_x64/dist/bin/'

Hello huangya17

Thank you so much for your recommendation.

Are you successful in using wass?

Please share with me the way to use wass with Matlab.

Thank you.

lsl159 commented 2 weeks ago

Hello I'm trying to run WASS on windows, but using the SBA library on Visual Studio 2019 doesn't work. What should I do.

fbergama commented 2 weeks ago

I suggest to use the pre-build binary image for Windows:

https://sites.google.com/unive.it/wass/software/wass/download

lsl159 commented 6 days ago

If I don't modify the code for WASS, the depth obtained after triangulation is measured in meters or millimeters. The code path is ..\wass-master\src\wass_stereo The baseline is 5cm, but the distance from the camera to the surface of the sea is not accurate. Is env.cam_distance = 1.0 a camera distance? Is the unit meters?

fbergama commented 4 days ago

The reconstructed point cloud is normalized to the camera distance (called baseline). So, just multiply each point in the point cloud by the (measured) camera distance to get the reconstruction in the unit you like.