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

openMVG_main_ControlPointsRegistration or ui_openMVG_control_points_registration #1

Open
cogitas3d opened this issue Mar 18, 2022 · 24 comments

Comments

@cogitas3d
Copy link

Hi @edanvoye !

First of all thank you very much to make the "photogrammetry_example_seashell-master" avaiable!

Second, I'm translating the code to run on Linux and all works fine until the command that call "openMVG_main_ControlPointsRegistration". I saw on my build directory and this doesnt exist, only the ui_openMVG_control_points_registration. So, when you compiled it, did you use different option?

A big hug!

@edanvoye
Copy link
Owner

edanvoye commented Mar 18, 2022

I believe the code you are looking for is in this PR in OpenMVG, which has not been merged yet : openMVG/openMVG#1239

That PR was submitted to OpenMVG to be able to run this ControlPointRegistration from the command line without invoking the UI.

@edanvoye
Copy link
Owner

I just updated that PR on OpenMVG so it compiles with the current version of the 'develop' branch.

@cogitas3d
Copy link
Author

Hi @edanvoye !

Thank you to answer!

I downloaded your code, but I had an error, even I installed all depencencies:

CMake Error at CMakeLists.txt:356 (add_subdirectory):
The source directory

/openMVG_Aruco_edanvye/openMVG/src/dependencies/osi_clp

does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:357 (set_property):
set_property could not find TARGET lib_clp. Perhaps it has not yet been
created.

CMake Error at CMakeLists.txt:358 (set_property):
set_property could not find TARGET lib_CoinUtils. Perhaps it has not yet
been created.

CMake Error at CMakeLists.txt:359 (set_property):
set_property could not find TARGET lib_Osi. Perhaps it has not yet been
created.

CMake Error at CMakeLists.txt:360 (set_property):
set_property could not find TARGET lib_OsiClpSolver. Perhaps it has not
yet been created.

So, I look at CMakeLists and appear this:

//COIN root directory
COIN_ROOT_DIR:PATH=

But like I said, I installed all depencies.

@edanvoye
Copy link
Owner

I'm not sure what you are trying to build exactly, but I just performed the following without issues on linux (ubuntu 18.04), following the build instructions in openMVG/BUILD.md:

git clone https://github.com/edanvoye/openMVG.git
cd openMVG
git checkout develop-control-point-reg
git submodule init
git submodule update
sudo apt-get install libpng-dev libjpeg-dev libtiff-dev libxxf86vm1 libxxf86vm-dev libxi-dev libxrandr-dev
cmake -DCMAKE_BUILD_TYPE=RELEASE ../openMVG/src/
cmake --build . 
Linux-x86_64-RELEASE/openMVG_main_ControlPointsRegistration

@cogitas3d
Copy link
Author

Great, thank you @edanvoye !

Now It works very well! I build perfectly.

But, after I run the syste I measured the size of target and, wow, it really works!

A question, is it possible you share the marker file for that want to use on their own photogrammetry?

@edanvoye
Copy link
Owner

Good to hear!

I have added some information on how to generate the aruco board, and I included an image file, which can be printed at 300 dpi (4cm x 7 cm). It is also possible to use a different size board, but then the reference values in the script will need to be updated (marker_info in add_markers.py).

@cogitas3d
Copy link
Author

Thank you again my friend!

@cogitas3d
Copy link
Author

Hi @edanvoye!

I did a target on Inkscape like yours, I print and it works!

Captura de tela_2022-03-20_20-05-45

For that who whats to download:
Aruco_Markers_6.pdf

Thank you and a big hug!

@edanvoye
Copy link
Owner

Awesome! Can I add your file to the github project ?

@cogitas3d
Copy link
Author

@edanvoye

Sure! You can use, the goal is this, help the project.

@cogitas3d
Copy link
Author

Hi @edanvoye !

I develop a way to scan faces with points and clean it after photogrammetry using OpenCV:
Captura de tela_2022-03-21_11-33-40

So, I use the above solution + your Aruco approach, to creat a face (test with 26 photos) with good surface and in scale and alignet. To make the systesm simpler I let only 10 Aruco markers, and all works!

Captura de tela_2022-03-21_17-22-49

I will put this solution avaiable in the addon OrtogOnBlender to help people on health field (rhinoplasty, orthognathic surgery, facial prosthesis and veterinaty prosthesis).

Again and again and again, thank you!

@edanvoye
Copy link
Owner

Great work!

@cogitas3d
Copy link
Author

I finish the beta test on Linux (OrtogOnBlender addon), now Ill work on Windows and Mac OS versions.

Captura de tela_2022-03-22_17-42-12

A previous classe (in Portuguese) explainning the tecnic: https://youtu.be/oJmMt1xvPfY

Next step is write a book chapter wiall all refs, like this Github site, PDF with markers, etc.

@cogitas3d
Copy link
Author

Hi @edanvoye !

Preview html (I had some other things to complete there) chapter with acknowledgements to you and links for your GigHub site: http://ortogonline.com/doc/pt_br/OrtogOnLineMag/4/Aruco.html

When I finish Ill compile the PDF version.

A big hug!

@edanvoye
Copy link
Owner

edanvoye commented Apr 1, 2022

Great work, congrats!

@cogitas3d
Copy link
Author

@edanvoye

Hey there!
I build OpenMVG+ArUco on Ubuntu 24.04. All appear work well, but when I run:

~/Programs/OrtogOnBlender_XP/OpenMVG_aruco/openMVG_main_ControlPointsRegistration -i /tmp/tmp4r0jraqa/sfm_data_markers.json -o /tmp/tmp4r0jraqa/sfm_data_aligned.bin

Happen this:

Control points observation triangulations:
inf inf inf inf inf inf inf inf inf inf
-nan -nan -nan -nan -nan -nan -nan -nan -nan -nan
-nan -nan -nan -nan -nan -nan -nan -nan -nan -nan

Control points coords:
0 15 30 45 60 0 15 30 45 60
25 25 25 25 25 40 40 40 40 40
0 0 0 0 0 0 0 0 0 0

Found transform:
scale: -nan
rotation:
-nan -nan -nan
-nan -nan -nan
-nan -nan -nan
translation: nan nan nan
CP index: 0
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

CP index: 1
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

CP index: 2
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

CP index: 3
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

CP index: 4
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

CP index: 5
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

CP index: 6
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

CP index: 7
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

CP index: 8
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

CP index: 9
CP triangulation error: -nan pixel(s)
CP registration error: -nan user unit(s)

problem_impl.cc:572 Parameter block not found: 0x5e0cb0ece3e8. You must add the parameter block to the problem before it can be set constant.
Abortado (imagem do núcleo gravada)

May you know a way to solve this?
A big hug!

@cogitas3d cogitas3d reopened this Nov 17, 2024
@edanvoye
Copy link
Owner

@cogitas3d Why is this issue being submitted in the photogrammetry_example_seashell repo, instead of the openMVG repository where this code lives?

@cogitas3d
Copy link
Author

@edanvoye I thought about it, however, the problem only appears after I apply the add_markers.py step. If I don't do this, the photogrammetry works, but without the scale (ArUco) data, which is made possible thanks to the solution you created and that I discussed above.

@cogitas3d
Copy link
Author

@edanvoye

Hi again.
I don't know if you had the opportunity to read my last message with the arguments about the reasons I published here. I would like to take this opportunity to ask you: have you compiled the current version of OpenMVG with the add_markers.py option? If so, were there any changes or did you need to take additional precautions?

I await your response. Best regards.

@cogitas3d
Copy link
Author

@edanvoye ping.
I am updating an open surgical planning system and would love to be able to resize the model to full scale, but unfortunately I am experiencing the errors mentioned above. I imagine you are short on time to help, but I would greatly appreciate it if you could do so, as it seems that only you have control over this situation.
A big hug!

@edanvoye
Copy link
Owner

only you have control over this situation

This is incorrect, it's opensource software, anyone can debug and fix this. First, which version of OpenMVG are you compiling and using? Are you using the same code as before, but the only difference is you built on ubuntu22 instead of 18? What else has changed, is this the same data files, same json file that worked before? we need more information

@cogitas3d
Copy link
Author

@edanvoye Thanks for the answer.
Im using the develope version of OpenMVG: https://github.com/openMVG/openMVG, compiled on Ubuntu 24.04.
I download your files and I follow the step by step you show some years ago.

@edanvoye
Copy link
Owner

develope version of OpenMVG: https://github.com/openMVG/openMVG, compiled on Ubuntu 24.04

But that version does not include "openMVG_main_ControlPointsRegistration", yet your message from [Nov 17, 2024] includes this command.

@cogitas3d
Copy link
Author

Dear @edanvoye

Curiously, yes, that version had:

Image

So, Im sharing the source I build in that opportunity:

https://drive.google.com/file/d/1mh7Kft8QW5XcQ2bXyi99mLrpzrZiRqHD/view?usp=sharing

Thank you.

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

No branches or pull requests

2 participants