Commit fd06680d authored by Aron Rubin's avatar Aron Rubin Committed by Davis E. King

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.
parent a9b9299f
...@@ -24,9 +24,10 @@ namespace dlib ...@@ -24,9 +24,10 @@ namespace dlib
return cv::Mat(); return cv::Mat();
typedef typename image_traits<image_type>::pixel_type type; 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) 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 else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment