Skip to content
Snippets Groups Projects
Unverified Commit 145fbe7e authored by Andrews Sobral's avatar Andrews Sobral Committed by GitHub
Browse files

Merge pull request #97 from Gxllii/liguangli-branch

Fixes for CodeBook algorithm
parents 8c62aebe 2ee96aed
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,14 @@ void CodeBook::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &i ...@@ -43,7 +43,14 @@ void CodeBook::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &i
} }
cv::Mat img_input_gray; cv::Mat img_input_gray;
cv::cvtColor(img_input, img_input_gray, CV_BGR2GRAY);
if (img_input.channels() == 1)
{
img_input_gray = img_input;
} else
{
cv::cvtColor(img_input, img_input_gray, CV_BGR2GRAY);
}
fg_cb(img_input_gray, img_foreground); fg_cb(img_input_gray, img_foreground);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment