Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Like4Schnitzel committed Apr 12, 2024
1 parent 29e7c35 commit 0818e59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/transcoder/videotranscoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ int getColorDiff(cv::Scalar col1, cv::Scalar col2)
pow(col1[2] - col2[2], 2);
}

double min(double a, double b) {if (a < b) return a; else return b;}
double max(double a, double b) {if (a < b) return b; else return a;}

/// @brief Calculates the mean color of a possibly pixel-misaligned submatrix inside a pixel matrix.
cv::Vec3b meanColWithSubPixels(cv::Mat mat, double x, double y, double width, double height)
{
Expand Down Expand Up @@ -559,7 +562,7 @@ std::shared_ptr<CharInfo []> VideoTranscoder::transcodeFrame()
double tempX = xAnchor;
for (int v = 0; v < subPixelMatrixSize; v++)
{
rect.at<cv::Vec3b>(u, v) = meanColWithSubPixels(file, tempX, tempY, nthWidth, nthHeight);
rect.at<cv::Vec3b>(u, v) = meanColWithSubPixels(frame, tempX, tempY, nthWidth, nthHeight);
tempX += nthWidth;
}
tempY += nthHeight;
Expand Down

0 comments on commit 0818e59

Please sign in to comment.