25 #ifndef INCLUDED_DirectShowToCV_h_GUID_C9B19C46_CA43_4481_A5B9_CB76397DD2C3 
   26 #define INCLUDED_DirectShowToCV_h_GUID_C9B19C46_CA43_4481_A5B9_CB76397DD2C3 
   32 #include <opencv2/core/core.hpp> 
   37 template <
typename CameraType> 
inline cv::Mat retrieve(CameraType &camera) {
 
   38     int minx, miny, maxx, maxy;
 
   39     camera.read_range(minx, maxx, miny, maxy);
 
   40     auto height = maxy - miny + 1;
 
   41     auto width = maxx - minx + 1;
 
   44         cv::Mat(camera.get_pixel_buffer()).reshape(3 , height);
 
   46     cv::flip(frame, ret, 0);
 
   50 #endif // INCLUDED_DirectShowToCV_h_GUID_C9B19C46_CA43_4481_A5B9_CB76397DD2C3