| 947 | |
| 948 | template <typename EXP> |
| 949 | typename dlib::enable_if<is_same_type<dlib::rgb_pixel,typename EXP::type> >::type assign_image_to_matlab ( |
| 950 | dlib::uint8* mat, |
| 951 | const matrix_exp<EXP>& item |
| 952 | ) |
| 953 | { |
| 954 | for (long c = 0; c < item.nc(); ++c) |
| 955 | for (long r = 0; r < item.nr(); ++r) |
| 956 | *mat++ = item(r,c).red; |
| 957 | for (long c = 0; c < item.nc(); ++c) |
| 958 | for (long r = 0; r < item.nr(); ++r) |
| 959 | *mat++ = item(r,c).green; |
| 960 | for (long c = 0; c < item.nc(); ++c) |
| 961 | for (long r = 0; r < item.nr(); ++r) |
| 962 | *mat++ = item(r,c).blue; |
| 963 | } |
| 964 | |
| 965 | template <typename T, typename EXP> |
| 966 | typename disable_if<is_same_type<dlib::rgb_pixel,typename EXP::type> >::type assign_image_to_matlab ( |
no test coverage detected