Skip to content

Commit bc99eb9

Browse files
authored
Merge pull request #510 from Nuzhny007/master
Fix debug build with CLIP
2 parents 75d1fd0 + 435c279 commit bc99eb9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Detector/OCVDNNDetector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ void OCVDNNDetector::Detect(const cv::UMat& colorFrame)
369369
void OCVDNNDetector::DetectInCrop(const cv::UMat& colorFrame, const cv::Rect& crop, regions_t& tmpRegions)
370370
{
371371
//Convert Mat to batch of images
372-
cv::dnn::blobFromImage(cv::UMat(colorFrame, crop), m_inputBlob, 1.0, cv::Size(m_inWidth, m_inHeight), m_meanVal, m_swapRB, false, CV_8U);
372+
cv::dnn::blobFromImage(colorFrame(crop), m_inputBlob, 1.0, cv::Size(m_inWidth, m_inHeight), m_meanVal, m_swapRB, false, CV_8U);
373373

374374
m_net.setInput(m_inputBlob, "", m_inScaleFactor, m_meanVal); //set the network input
375375

thirdparty/ruclip/RuCLIPProcessor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ cv::Mat RuCLIPProcessor::ResizeToInput(const cv::Mat& img, bool saveAspectRatio)
8484
int xOffset = (ImageSize - newWidth) / 2;
8585
int yOffset = (ImageSize - newHeight) / 2;
8686

87-
assert(2 * m_XOffset + newWidth == ImageSize);
88-
assert(2 * m_YOffset + newHeight == ImageSize);
87+
assert(2 * xOffset + newWidth == ImageSize);
88+
assert(2 * yOffset + newHeight == ImageSize);
8989

9090
cv::resize(img, newImg(cv::Rect(xOffset, yOffset, newWidth, newHeight)), cv::Size(newWidth, newHeight), 0, 0, cv::INTER_CUBIC);
9191
}

0 commit comments

Comments
 (0)