updated ransanc model

This commit is contained in:
edgarriba 2014-08-08 13:52:15 +02:00
parent c07cd007eb
commit 8b732e086d
2 changed files with 10 additions and 10 deletions

View File

@ -203,7 +203,7 @@ bool cv::solvePnPRansac(InputArray _opoints, InputArray _ipoints,
Ptr<PointSetRegistrator::Callback> cb; // pointer to callback
cb = makePtr<PnPRansacCallback>( cameraMatrix, distCoeffs, flags, useExtrinsicGuess, rvec, tvec);
int model_points = 4; // minimum of number of model points
int model_points = flags == P3P ? 4 : 6; // minimum of number of model points
double param1 = reprojectionError; // reprojection error
double param2 = confidence; // confidence
int param3 = iterationsCount; // number maximum iterations

View File

@ -1,11 +1,11 @@
set(sample_dir ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_code/calib3d/real_time_pose_estimation/src/)
set(target cpp-tutorial-)
if(HAVE_opencv_nonfree)
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/nonfree/include")
endif()
set(sample_pnplib
${sample_dir}main_registration.cpp
${sample_dir}CsvReader.cpp
${sample_dir}CsvWriter.cpp
${sample_dir}ModelRegistration.cpp
@ -16,12 +16,12 @@ set(sample_pnplib
${sample_dir}RobustMatcher.cpp
)
add_executable( pnp_registration ${sample_pnplib} )
add_executable( pnp_verification ${sample_pnplib} )
add_executable( pnp_detection ${sample_pnplib} )
add_executable( pnp_test ${sample_pnplib} )
add_executable( ${target}pnp_registration ${sample_dir}main_registration.cpp ${sample_pnplib} )
add_executable( ${target}pnp_verification ${sample_dir}main_verification.cpp ${sample_pnplib} )
add_executable( ${target}pnp_detection ${sample_dir}main_detection.cpp ${sample_pnplib} )
add_executable( ${target}pnp_test ${sample_dir}test_pnp.cpp )
ocv_target_link_libraries(pnp_registration ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
ocv_target_link_libraries(pnp_verification ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
ocv_target_link_libraries(pnp_detection ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
ocv_target_link_libraries(pnp_test ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
ocv_target_link_libraries( ${target}pnp_registration ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS} )
ocv_target_link_libraries( ${target}pnp_verification ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS} )
ocv_target_link_libraries( ${target}pnp_detection ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS} )
ocv_target_link_libraries(${target}pnp_test ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS} )