Merge pull request #22147 from rogday:zoom_factor
Add zoom factor to interactive calibration tool * add zoom factor * address review comments
This commit is contained in:
@@ -201,7 +201,16 @@ void CalibProcessor::showCaptureMessage(const cv::Mat& frame, const std::string
|
||||
double textSize = VIDEO_TEXT_SIZE * frame.cols / (double) IMAGE_MAX_WIDTH;
|
||||
cv::bitwise_not(frame, frame);
|
||||
cv::putText(frame, message, textOrigin, 1, textSize, cv::Scalar(0,0,255), 2, cv::LINE_AA);
|
||||
cv::imshow(mainWindowName, frame);
|
||||
cv::Mat resized;
|
||||
if (std::fabs(mZoom - 1.) > 0.001f)
|
||||
{
|
||||
cv::resize(frame, resized, cv::Size(), mZoom, mZoom);
|
||||
}
|
||||
else
|
||||
{
|
||||
resized = frame;
|
||||
}
|
||||
cv::imshow(mainWindowName, resized);
|
||||
cv::waitKey(300);
|
||||
}
|
||||
|
||||
@@ -267,6 +276,7 @@ CalibProcessor::CalibProcessor(cv::Ptr<calibrationData> data, captureParameters
|
||||
mSquareSize = capParams.squareSize;
|
||||
mTemplDist = capParams.templDst;
|
||||
mSaveFrames = capParams.saveFrames;
|
||||
mZoom = capParams.zoom;
|
||||
|
||||
switch(mBoardType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user