I get the following messages when attempting to use camera_solve on a pair of roughly square grayscale images showing the same object from perspectives about 10 degrees apart. The pics were both cropped, and converted to grayscale TIF's. The cropped portion of each pic is NOT centered on camera lens the optical center, if that matters.
./bin/camera_solve out-test/ "TestImages/Image1.tif" "TestImages/Image2.tif" --calib-file "phone_camera_models/vw_cam_params.tsai"
build_reconstruction --flagfile /home/tim/AmesStereoPipeline/out-test/theia_flagfile.txt
Reading calibration file: /home/tim/AmesStereoPipeline/out-test/expanded_camera_configs.txt
Loading image data for Image1.tif
Loaded intrinsic data: 3644.94
Loading image data for Image2.tif
Loaded intrinsic data: 3644.94
build_reconstruction: Relink `/home/tim/AmesStereoPipeline/libexec/../lib/./libgfortran.so.4' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'
I0421 20:09:13.220003 5269 feature_extractor_and_matcher.cc:187] Image /home/tim/AmesStereoPipeline/out-test/Image1.tif contained an EXIF focal length: 3644.94
I0421 20:09:13.220355 5268 feature_extractor_and_matcher.cc:187] Image /home/tim/AmesStereoPipeline/out-test/Image2.tif contained an EXIF focal length: 3644.94
I0421 20:09:13.847667 5269 image.h:232] Image is already a grayscale image. No conversion necessary.
I0421 20:09:13.910998 5268 image.h:232] Image is already a grayscale image. No conversion necessary.
I0421 20:09:41.269099 5268 feature_extractor_and_matcher.cc:96] Successfully extracted 0 features from image /home/tim/AmesStereoPipeline/out-test/Image2.tif
I0421 20:09:50.389133 5269 feature_extractor_and_matcher.cc:96] Successfully extracted 0 features from image /home/tim/AmesStereoPipeline/out-test/Image1.tif
I0421 20:09:50.477113 5266 feature_extractor_and_matcher.cc:161] Matching images...
I0421 20:09:50.477449 5274 feature_matcher.cc:260] Could not match a sufficient number of features between images Image2.tif and Image1.tif
I0421 20:09:50.477502 5266 feature_matcher.cc:226] Matched 0 image pairs out of 1 possible image pairs.
I0421 20:09:50.477927 5266 reconstruction_builder.cc:253] 0 of 1 view pairs were matched and geometrically verified.
I0421 20:09:50.477977 5266 reconstruction_builder.cc:270] Writing matches to file: /home/tim/AmesStereoPipeline/out-test/theia_matches.dat
F0421 20:09:50.478413 5266 reconstruction_builder.cc:327] Check failed: view_graph_->NumViews() >= 2 (0 vs. 2) At least 2 images must be provided in order to create a reconstruction.
*** Check failure stack trace: ***
@ 0x7f0aef4364dd google::LogMessage::Fail()
@ 0x7f0aef43e071 google::LogMessage::SendToLog()
@ 0x7f0aef435ecd google::LogMessage::Flush()
@ 0x7f0aef43776a google::LogMessageFatal::~LogMessageFatal()
@ 0x7f0aef1d0b65 theia::ReconstructionBuilder::BuildReconstruction()
@ 0x5596f0a327a2 main
@ 0x7f0aebfd6c87 __libc_start_main
@ 0x5596f0a33da9 (unknown)
I created the pics with my smartphone camera, and did camera_calibrate to create the TSAI file for that phone. It took about 2 minutes to camera_calibrate, then said it was successful. I had to add a line "pitch = 1.0" to the TSAI file to avoid an error in camera_solve saying it could not find the pitch.
Here is the camera_calibrate command and output:
./bin/camera_calibrate --overwrite --box-size-cm 3.19 phone_camera_models 4 4 "./IntrinsicCalibration/Checkerboard?.jpg"
opencv_calibrate -pt chessboard -o /home/tim/AmesStereoPipeline/phone_camera_models/ocv_cam_params.yml -p /home/tim/AmesStereoPipeline/phone_camera_models/ocv_image_list.xml -w 4 -h 4 -s 0.0319
RMS error reported by calibrateCamera: 0.702757
Calibration succeeded. avg reprojection error = 0.70
Finished in 110.33601665496826 seconds.
Here is the resulting TSAI file:
fu = 3640.9618998500737
fv = 3648.9257077904635
cu = 1170.0
cv = 2080.0
u_direction = 1 0 0
v_direction = 0 1 0
w_direction = 0 0 1
C = 0 0 0
R = 1 0 0 0 1 0 0 0 1
k1 = 0.27787369966088105
k2 = -0.9923733586455643
p1 = -0.000734989326718432
p2 = 0.0011715951586638608
pitch = 1.0
I think the error messages from camera_solve mean it cannot find any features in either of the input images, but I may be misreading it. Any idea what is wrong?
Thanks,
Tim Yaukey