MCPcopy Create free account
hub / github.com/davisking/dlib / assign_image_to_matlab

Function assign_image_to_matlab

dlib/matlab/mex_wrapper.cpp:949–963  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 (

Callers 1

assign_to_matlabFunction · 0.85

Calls 2

ncMethod · 0.45
nrMethod · 0.45

Tested by

no test coverage detected