diff options
Diffstat (limited to 'rotord/src/cvimage.h')
| -rw-r--r-- | rotord/src/cvimage.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rotord/src/cvimage.h b/rotord/src/cvimage.h index dc421de..6323d4d 100644 --- a/rotord/src/cvimage.h +++ b/rotord/src/cvimage.h @@ -3,6 +3,7 @@ #include <math.h> #include <cv.h> +#include <highgui.h> //converting to use a cv image... //cv::Mat supports most of what we want here @@ -120,6 +121,15 @@ namespace Rotor { else return false; */ } + bool read_file(std::string &filename){ + rgb=cv::imread(filename,CV_LOAD_IMAGE_COLOR); + if (rgb.empty()) return false; + RGBdata=rgb.data; + ownsRGBdata=false; + w=rgb.rows; + h=rgb.cols; + return true; + } bool setup_fromRGB(int _w,int _h,uint8_t *pRGBdata,int linepadding=0){ //here the data belongs to libavcodec or other //could move to using cv::Mat there also and just passing cv:Mat over |
