Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using only some of the images from the Eyesis-4pi camera #1

Open
polto opened this issue Nov 1, 2016 · 11 comments
Open

using only some of the images from the Eyesis-4pi camera #1

polto opened this issue Nov 1, 2016 · 11 comments
Assignees

Comments

@polto
Copy link

polto commented Nov 1, 2016

Hi Pierre,

Could you please implement a filter to specify only some images from Eyesis-4pi to be used in the reconstruction (for example the two stereo-pairs) ?

Also, since all intrinsic & extrinsic parameters of the rig are known how to disallow OpenMVG to adjust them later during the pipeline ?
Regards.

@pmoulon
Copy link
Member

pmoulon commented Nov 2, 2016

Hi @polto,

  1. implement a channel filter must be easy, I will consider this task when pushing a commit for the feature. Stay tuned ;-)
  2. In order to disable intrinsic parameter refinement you must use the option -f NONE on GlobalSfM 🎃

@polto
Copy link
Author

polto commented Nov 2, 2016

thanks @pmoulon !

@polto polto closed this as completed Nov 2, 2016
@pmoulon
Copy link
Member

pmoulon commented Nov 2, 2016

I let the task as open since I have not yet handle it

@pmoulon pmoulon reopened this Nov 2, 2016
@pmoulon pmoulon self-assigned this Nov 2, 2016
pmoulon added a commit that referenced this issue Nov 8, 2016
@pmoulon
Copy link
Member

pmoulon commented Nov 8, 2016

Feature ready to test.
Please checkout the branch develop_channel_filter then you can use the option -c
Use a list of ids you wanna keep. If you want to keep sensor 1,2,3,6 you can do
-c "1;2;3;6"

@polto
Copy link
Author

polto commented Nov 8, 2016

I have an error trying to build this branch.

root@d01:~/OpenMVG_SfMImageListing_Elphel_Camera_Build# make -j8
Scanning dependencies of target libfastcal
[ 33%] [ 66%] Building C object third_party/libfastcal/CMakeFiles/libfastcal.dir/src/fastcal-query.c.o
Building C object third_party/libfastcal/CMakeFiles/libfastcal.dir/src/fastcal-parser.c.o
Linking C static library liblibfastcal.a
[ 66%] Built target libfastcal
Scanning dependencies of target main_openMVG_SfMImageListing_Elphel_Camera
[100%] Building CXX object CMakeFiles/main_openMVG_SfMImageListing_Elphel_Camera.dir/main.cpp.o
/root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp: In function ‘int main(int, char**)’:
/root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp:85:41: error: parameter declared ‘auto’
         [&channel_to_keep](const auto & val)
                                         ^
/root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp: In lambda function:
/root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp:87:15: error: ‘val’ was not declared in this scope
           if (val.empty()) // in order to handle input like ";" or ";;;"
               ^
/root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp:90:32: error: ‘val’ was not declared in this scope
           std::stringstream os(val);
                                ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/local/include/openMVG/third_party/eigen/Eigen/Core:160,
                 from /usr/local/include/openMVG/numeric/numeric.h:35,
                 from /root/OpenMVG_SfMImageListing_Elphel_Camera/elphel_utils.hpp:28,
                 from /root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp:20:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<std::basic_string<char>*, std::vector<std::basic_string<char> > >; _Funct = main(int, char**)::__lambda14]’:
/root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp:94:7:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:4417:14: error: no match for call to ‘(main(int, char**)::__lambda14) (std::basic_string<char>&)’
  __f(*__first);
              ^
/root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp:85:26: note: candidate is:
         [&channel_to_keep](const auto & val)
                          ^
/root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp:85:44: note: main(int, char**)::__lambda14
         [&channel_to_keep](const auto & val)
                                            ^
/root/OpenMVG_SfMImageListing_Elphel_Camera/main.cpp:85:44: note:   candidate expects 0 arguments, 1 provided
lsmake[2]: *** [CMakeFiles/main_openMVG_SfMImageListing_Elphel_Camera.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/main_openMVG_SfMImageListing_Elphel_Camera.dir/all] Error 2
make: *** [all] Error 2

@pmoulon
Copy link
Member

pmoulon commented Nov 8, 2016

Does changing auto to std::string is working?

@polto
Copy link
Author

polto commented Nov 8, 2016

oh yeah !
launching a long test. :)

@pmoulon
Copy link
Member

pmoulon commented Nov 8, 2016

Using auto as lambda parameter is authorized in C++14 or not C++11, that is explaining the error.
👍

pmoulon added a commit that referenced this issue Nov 9, 2016
@polto
Copy link
Author

polto commented Nov 9, 2016

it's working. Here is a small segment processed with channels 10;14;24;25 (both stereo pairs looking in opposite directions)

capture du 2016-11-09 18 19 57

this is the result of GlobalSfM. I am running now openMVG_main_ComputeStructureFromKnownPoses , but the last step "Per triplet tracks validation (discard spurious correspondences):" is really slow.

Could you please explain these parameters of openMVG_main_ComputeStructureFromKnownPoses :

[-f|--match_file] path to a matches file (loaded pair indexes will be used)
[-p|--pair_file] path to a pairs file (only those pairs will be considered to compute the structure)
[-b|--bundle_adjustment] (switch) perform a bundle adjustment on the scene (OFF by default)

I do not really understand why would you need to provide match_pairs file after you have done the SfM.

Now, once we are done with SfM using only several channels, how can I export all channels from the rigid rig to PMVS, OpenMVS or MVE ?

@pmoulon
Copy link
Member

pmoulon commented Nov 10, 2016

Happy to see that it worked! It's a promising results.
Impatient to add the GPS prior in the loop to make the results even more robust!

Regarding the slowliness of openMVG_main_ComputeStructureFromKnownPoses
The default algorithm use all the pair that are computed by frustum intersection, so it computes often too many. In order to make the process faster you can specify the geometric matches as input (only the pairs from this file will be used). It will make the process faster => just provide the matches.e.bin file with the -f option.

If you want to export all the channel, I have to write a new binary that will take as input the SfM result and the image file. So image will be listed again and linked to the right poses.

Then we will certainly need to compute some visility matches (using openMVG_main_ComputeStructureFromKnownPoses perhaps) and then export to PMVS, OpenMVS or MVE.

@pmoulon
Copy link
Member

pmoulon commented Nov 10, 2016

Modification was merged in master.

I will open a new issue in order to handle your request to add views to existing poses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants