mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-10 03:10:04 +08:00
Fix grayscale images recogntion
This commit is contained in:
@@ -89,8 +89,11 @@ namespace alpr
|
|||||||
cv::Mat color_transmtx = cv::getPerspectiveTransform(projectedPoints, deskewed_points);
|
cv::Mat color_transmtx = cv::getPerspectiveTransform(projectedPoints, deskewed_points);
|
||||||
cv::warpPerspective(pipeline_data->colorImg, pipeline_data->color_deskewed, color_transmtx, pipeline_data->color_deskewed.size());
|
cv::warpPerspective(pipeline_data->colorImg, pipeline_data->color_deskewed, color_transmtx, pipeline_data->color_deskewed.size());
|
||||||
|
|
||||||
|
if (pipeline_data->color_deskewed.channels() > 2)
|
||||||
|
{
|
||||||
// Make a grayscale copy as well for faster processing downstream
|
// Make a grayscale copy as well for faster processing downstream
|
||||||
cv::cvtColor(pipeline_data->color_deskewed, pipeline_data->crop_gray, CV_BGR2GRAY);
|
cv::cvtColor(pipeline_data->color_deskewed, pipeline_data->crop_gray, CV_BGR2GRAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (this->config->debugGeneral)
|
if (this->config->debugGeneral)
|
||||||
|
Reference in New Issue
Block a user