title: opencv image update in gtk for video streaming linux with C programming
body: <p>I am using opencv 1.0.0 and gtk2.0. I want to grab images continuously from a video stream. So far I have successfully been able to grab still image. This is non standard IP camera not VGA/USB /V4L one so need to know explicit method to refresh or update images continuously for video streaming!</p>
  
  <pre><code>GtkWidget *image;
  
  ...
  ...
  
  IplImage*   bayerImage = NULL;
  IplImage*   rgbImage = NULL;
  
  ...
  ...
  ...
  
  cvCvtColor( bayerImage, rgbImage, CV_BayerBG2RGB );
  // Usually opencv image is BGR, so we need to change it to RGB
  
  pix = gdk_pixbuf_new_from_data ((guchar*)rgbImage-&gt;imageData,
                   GDK_COLORSPACE_RGB,
                   FALSE,
                  rgbImage-&gt;depth,
                  rgbImage-&gt;width,
                  rgbImage-&gt;height,
                   (rgbImage-&gt;widthStep),
                    NULL,
                    NULL);
  image = gtk_image_new_from_pixbuf (pix);  
  </code></pre>