summaryrefslogtreecommitdiff
path: root/rotord/src/cvimage.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/cvimage.h')
-rw-r--r--rotord/src/cvimage.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/rotord/src/cvimage.h b/rotord/src/cvimage.h
index 68bdb48..6323d4d 100644
--- a/rotord/src/cvimage.h
+++ b/rotord/src/cvimage.h
@@ -121,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