Add fisheye calibration, getK, getRes, and zynqGrabber building option#222
Add fisheye calibration, getK, getRes, and zynqGrabber building option#222
Conversation
| set(prophesee_core_FOUND OFF) | ||
| endif() | ||
|
|
||
| option(BUILD_ZYNQGRABBER "Build the zynqGrabber module" ON) |
There was a problem hiding this comment.
not sure why building zynqGrabber is related to IPT code? did we already discuss this?
There was a problem hiding this comment.
Sorry for confusing you. Building zynqGrabber is not related to IPT. But it is related to building the event-driven on MAC. I didn't commit it before. I am going to commit it in another pull request.
| cam_matrix[cam].at<double>(2, 2) = 1.0; | ||
| cam_matrix[cam].at<double>(0, 2) = parameters.find("cx").asFloat64(); | ||
| cam_matrix[cam].at<double>(1, 2) = parameters.find("cy").asFloat64(); | ||
| if(cam == 0) { |
There was a problem hiding this comment.
what happens if no distortion model is provided?
| projection[cam], size_shared, CV_32FC2, | ||
| mat_reverse_map[cam], cv::noArray()); | ||
|
|
||
| if(distortion_model == "b'radtan'") { |
There was a problem hiding this comment.
is it common knowledge that "b'radtan'" means pinhole, while "equidistant" means fisheye? Can we make sure this is more intuitive?
| cv::initUndistortRectifyMap(cam_matrix[cam], dist_coeff[cam], rotation[cam], | ||
| projection[cam], size_shared, CV_32FC2, | ||
| mat_reverse_map[cam], cv::noArray()); | ||
| } else if (distortion_model == "equidistant") { |
There was a problem hiding this comment.
what happens if no distortion model is provided? or if there is a spelling mistake in the distortion model? seg fault?
| return Q; | ||
| } | ||
|
|
||
| const cv::Mat& vIPT::getK(int cam) { |
There was a problem hiding this comment.
what happens if cam = 2. we would return cam[0]? it could introduce error.
what about
if( cam == 0 || cam == 1 ) return cam_matrix[cam]
else return empty matrix?
| dist_coeff[1], size_cam[0], stereo_rotation, stereo_translation, | ||
| rotation[0], rotation[1], projection[0],projection[1], Q, | ||
| CALIB_ZERO_DISPARITY, 1, size_shared); | ||
| if(distortion_model == "b'radtan'") { |
There was a problem hiding this comment.
also here - what happens if not provided or provided incorrectly
Modifications
distortion_model: b'radtan' or equidistant.