luca-penasa / Apero2Meshlab

Code to be placed in the src/uti_files/CPP_Apero2Meshlab.cpp of micmac that adds a micmac tools for converting apero poses to meshlab cameras. Also other changes to the micmac code are needed in order to work!
4 stars 2 forks source link

The principal point L361 #4

Open krystopher opened 8 years ago

krystopher commented 8 years ago

Hello,

A first thing I want to say thank you for this git it helped me very well . I write a python module that extract datas(and an other module to write meshlab project) from exifs datas and Ori-All file that is generated by MicMac.

So I think that when I work on this module, I resolve a problem on your code, L361 CPP_Apero2Meshlab.cpp you calculate the principal point with cal_xml.PP() . It could be interesting to try something because it work in my code , I will write that in hight level language:

(PP_x , PP_y)=cal_xml.PP() (vp_x , vp_y)=viewport true_pp=( PP_x , vp_y - PP_y )

and true_pp will be your meshlab raster center.

An other thing the name of the git/file Apero2Meshlab, I have a doubt about the fact that it is apero that generate the orientation file, I think that it is tapas . Apero generate a ply file that contain a cloud of points with the 3D scene and the cameras that are represented with points. I write that but I have no certitude about that so it could be a chance to lean something for me.

To do a conclusion I hope that it is the solution and thank for the sources.

rjanvier commented 8 years ago

Thanks a lot for your suggestion. I think there is not really any problem with this code. But sometime the alignment is not so good, maybe your trick fix that. I wonder why true_pp=( PP_x , vp_y - PP_y ) and not true_pp=( vp_x - PP_x , vp_y - PP_y ) Can you give a link to MicMac specifications or Meshlab ones that explain this ?

to answer to the second part of your message, Tapas is a wrapper around Apero, it launches Apero with pre-defined configuration files (XML). So Apero is indeed the kernel of calibration/orientation of MicMac and it export orientation/calibration as well as it can export ply file with sparse point cloud from calibration.

luca-penasa commented 8 years ago

thanks for reporting... Unfortunately apero2meshlab is not under development here cause it has been merged with the cultur3d project and every change or advancement should be better reported to the micmac developers.

said that... given it is not really easy to contribute to the official repo, could you still make a pull request? If you have verified it works fine we can merge with this repo for now... and then ask for the official release to update their copy...

for the

true_pp=( PP_x , vp_y - PP_y )

thing:

probably meshlab uses a different reference system for picture coordinates than micmac (top left vs bottom left origin, or vice-versa)...

Luca