c++ - OpenCv Error in C Wrapper for imread: QNativeImage: Unable to attach to shared memory segment -


here code running. i'm using ubuntu trusty g++ in emacs. i'm getting errors @ bottom of page use figure them out. program works, uses c wrappers imread , imshow above main in code. picture comes right after window opens long string of code below...it must wrappers because c++ imread , imshow work perfect..the wrappers written software analyst though inclusion in opencv i'm not sure issue is. googling brings vlc, ubuntu, , qt bugs none opencv. wrappers made other languages wrap around , cv_imread isn't working. reason decided debug running them. discovered this. rebuilt , reinstalled opencv 1 of steps got same message. appreciated.

   #include "opencv2/highgui/highgui.hpp" #include "opencv2/highgui/highgui_c.h" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/imgproc/imgproc_c.h" #include <iostream>  using namespace cv; using namespace std;  mat* cv_imread(string* filename, int flags) {      return new mat(imread(*filename, flags)); }  void cv_imshow(string* winname, mat* mat) {     cv::imshow(*winname, *mat); }  int main(  ) {     const char* = "/home/w/100_0229.jpg";     const char* c = "string";     mat*  b =  cv_imread(new string (a), 1);   cv_imshow(new string (c), b);  waitkey(0); //wait infinite time keypress       destroywindow("mywindow"); //destroy window name, "mywindow"  return 0; } 

errors:

  (b:19717): gtk-warning **: unable locate theme engine in module_path: "clearlooks", init done opengl support available qnativeimage: unable attach shared memory segment. x error: baddrawable (invalid pixmap or window parameter) 9   major opcode: 62 (x_copyarea)   resource id:  0x0 x error: baddrawable (invalid pixmap or window parameter) 9   major opcode: 62 (x_copyarea)   resource id:  0x0 x error: baddrawable (invalid pixmap or window parameter) 9   major opcode: 62 (x_copyarea)   resource id:  0x0 x error: baddrawable (invalid pixmap or window parameter) 9   major opcode: 62 (x_copyarea)   resource id:  0x0 x error: baddrawable (invalid pixmap or window parameter) 9   major opcode: 62 (x_copyarea)   resource id:  0x0 x error: baddrawable (invalid pixmap or window parameter) 9   major opcode: 62 (x_copyarea)   resource id:  0x0 x error: baddrawable (invalid pixmap or window parameter) 9   major opcode: 62 (x_copyarea)   resource id:  0x0 x error: baddrawable (invalid pixmap or window parameter) 9   major opcode: 62 (x_copyarea)   resource id:  0x0 1uuuuuuu compilation finished @ mon mar 24 02:46:13 

c++ capital sensitive, opencv use string parameter, use string. think string , string different thing. refer function prototype below:

static void* imread_( const string& filename, int flags, int hdrtype, mat* mat=0 )  mat imread( const string& filename, int flags ) 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -