Fixed type passing to opencv to use basic instead of aggregate. (#1010)

* Fixed type passing to opencv to use basic instead of aggregate.

* Change tabs to spaces.
This commit is contained in:
Aron Rubin 2017-12-12 21:23:47 -05:00 committed by Davis E. King
parent a9b9299f2d
commit fd06680d81
1 changed files with 2 additions and 1 deletions

View File

@ -24,9 +24,10 @@ namespace dlib
return cv::Mat();
typedef typename image_traits<image_type>::pixel_type type;
typedef typename pixel_traits<type>::basic_pixel_type basic_pixel_type;
if (pixel_traits<type>::num == 1)
{
return cv::Mat(num_rows(img), num_columns(img), cv::DataType<type>::type, image_data(img), width_step(img));
return cv::Mat(num_rows(img), num_columns(img), cv::DataType<basic_pixel_type>::type, image_data(img), width_step(img));
}
else
{