interactive-calibration: use empty() method instead of checking dimension size

pull/11582/head
Alexander Alekhin 7 years ago
parent 8307e06c1a
commit cf4f6d412e
  1. 3
      apps/interactive-calibration/frameProcessor.cpp

@ -395,7 +395,8 @@ ShowProcessor::ShowProcessor(cv::Ptr<calibrationData> data, cv::Ptr<calibControl
cv::Mat ShowProcessor::processFrame(const cv::Mat &frame) cv::Mat ShowProcessor::processFrame(const cv::Mat &frame)
{ {
if(mCalibdata->cameraMatrix.size[0] && mCalibdata->distCoeffs.size[0]) { if (!mCalibdata->cameraMatrix.empty() && !mCalibdata->distCoeffs.empty())
{
mTextSize = VIDEO_TEXT_SIZE * (double) frame.cols / IMAGE_MAX_WIDTH; mTextSize = VIDEO_TEXT_SIZE * (double) frame.cols / IMAGE_MAX_WIDTH;
cv::Scalar textColor = cv::Scalar(0,0,255); cv::Scalar textColor = cv::Scalar(0,0,255);
cv::Mat frameCopy; cv::Mat frameCopy;

Loading…
Cancel
Save