Skip to content

Commit b8f9ddc

Browse files
Update utils.cpp
1 parent fadd158 commit b8f9ddc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ char* Utils::PreProcess(const cv::Mat& iImg, std::vector<int> iImgSize, cv::Mat&
3030
resizeScales_ = iImg.cols / static_cast<float>(iImgSize.at(0));
3131
// Resize to target width, scaling height to maintain aspect ratio
3232
cv::resize(oImg, oImg, cv::Size(iImgSize.at(0), static_cast<int>(iImg.rows / resizeScales_)));
33-
} else {
33+
}
34+
else
35+
{
3436
// Height-dominant: scale by target height (iImgSize[1])
3537
resizeScales_ = iImg.rows / static_cast<float>(iImgSize.at(1));
3638
// Resize width proportionally to target height to maintain aspect ratio (height-dominant case)

0 commit comments

Comments
 (0)