mirror of https://github.com/davisking/dlib.git
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:
parent
a9b9299f2d
commit
fd06680d81
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue