hengli / camodocal

CamOdoCal: Automatic Intrinsic and Extrinsic Calibration of a Rig with Multiple Generic Cameras and Odometry
Other
1.18k stars 390 forks source link

The input of the infrastructure calibration #84

Open ptzu opened 6 years ago

ptzu commented 6 years ago

Hi, I try to run infra_calib, but it lacks the input map. I read Readme and it says that the map is generated by extrinsic calibration. However, I didn't see anything related to that when I read the code. Did I miss anything?

yuyadanyadan commented 6 years ago

Hi @abcd40404 If you haven't solved it, you should need to run extrinsic_calib of the bin folder to get the map frames_5.sg, which is in CameraRigBA.cc. Then you can load it in infra_calib.
However, when I use the infra_calib, I can't fins the same Frame in the first code line boost::unordered_map<const Frame, FrameTag>::const_iterator it = m_frameMap.find(frame.get()) in LocationRecognition::knnMatch. I use the same data to build the map and run infra_calib.

ptzu commented 6 years ago

Hi @yuyadanyadan Thanks for your reply. I have tried to run extrinsic_calib many times, but it didn't work. I typed "bin/extrinsic_calib -c . --input ../data/images/" to run it and moved the data generated from bin/intrinsic_calib to the build directory. Are these input data enough to run extrinsic_calib?

yuyadanyadan commented 5 years ago

Hi @abcd40404 ./extrinsic_calib --calib /home/yuyadan/catkin_ws_rgbd_image_save/data1/ --camera-count 2 --f 421 --output /home/yuyadan/catkin_ws_rgbd_image_save/data1/ --data /home/yuyadan/catkin_ws_rgbd_image_save/data1/ --input /home/yuyadan/catkin_ws_rgbd_image_save/data1/rec/Odo.rec the code of reading odometry and image has been changed according to myself data. And you need to put the camera_0_calib.yaml, camera_1_calib.yaml to the folder of input parameter calibDir. you can track error from the code.

ptzu commented 5 years ago

Hi @yuyadanyadan Sorry, I'm new to this, I would like to ask some stupid question. If I have only one camera, can I do this? What is odometry data actually? After I read the code, are estimate and event data necessary? Thank you.

yuyadanyadan commented 5 years ago

Hi, If you have one cam, the --camera-count 1. It can process one cam; the odometry data is x,y, yaw; the event data may be the GPS; the estimate ,event and mask which you can ignore

ptzu commented 5 years ago

Thanks for your help!!

ptzu commented 5 years ago

Hi, @yuyadanyadan After I tried it, I still can't run extrinsic_calib successfully. I got core dumped. I have camera_0_calib.yaml and images as input. Instruction: bin/extrinsic_calib -c . --input ../image/ Here is the error message: # INFO: Initializing... Get images and pose files out from result directory image name : ../image/camera_0_00298.png time : 298image name : ../image/camera_0_00150.png time : 150image name : ../image/camera_0_00088.png time : 88image name : ../image/camera_0_00308.png time : 308image name : ../image/camera_0_00016.png time : 16image name : ../image/camera_0_00438.png time : 438image name : ../image/camera_0_00042.png time : 42image name : ../image/camera_0_00138.png time : 138image name : ../image/camera_0_00236.png time : 236image name : ../image/camera_0_00440.png time : 440image name : ../image/camera_0_00134.png time : 134image name : ../image/camera_0_00102.png time : 102image name : ../image/camera_0_00344.png time : 344image name : ../image/camera_0_00450.png time : 450image name : ../image/camera_0_00004.png time : 4image name : ../image/camera_0_00106.png time : 106image name : ../image/camera_0_00008.png time : 8image name : ../image/camera_0_00048.png time : 48 # INFO: Initialization finished! # INFO: Running camera-odometry calibration for each of the 1 cameras. # ERROR: No segments, calibration fails!! # INFO: Calibrating odometry - camera 0... Rotation: 6.94725e-310 6.94717e-310 6.94725e-310 6.94725e-310 6.94717e-310 7.90505e-323 6.94717e-310 6.94717e-310 6.94717e-310 Translation: 2.52962e-321 0 6.94725e-310 # INFO: Completed camera-odometry calibration for all cameras. # INFO: Saving intermediate data... Done. Took 0.00s. # INFO: Running camera rig calibration. Segmentation Fault(Core dumped)

Could you give any advise?

poaongithub commented 5 years ago

same as mine, have you solved it? I would appreciate it if you would give some hints. @abcd40404

ynma-hanvo commented 3 years ago

hi, i just wonder where did you guys find the infra_calib tool, i only got intrinsic_calib, exterinsic_calib and stereo_calib