View Single Post
  #2   Spotlight this post!  
Unread 13-02-2012, 15:28
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 102
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Access to WPIImages and IPLImages

The following code fragments demonstrate going both directions:

Code:
public WPIImage processImage(WPIColorImage colorImg) {

  // Example of getting access to the underlying IplImage of a WPIImage

  WPIImageWrapper wrapper = new WPIImageWrapper(colorImg);
  IplImage iplImage = wrapper.getIplImage();

  // Example of getting the BufferedImage from a IplImage and constructing
  // a new WPIColorImage

  WPIColorImage newColorImg = new WPIColorImage(iplImage.getBufferedImage()); 

  return newColorImg;
}
Reply With Quote