code: public static BufferedImage renderContours(List<Contour> contours , int colorExternal, int colorInternal ,
  											   int width , int height , BufferedImage out) {
  
  		if( out == null ) {
  			out = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB);
  		} else {
  			Graphics2D g2 = out.createGraphics();
  			g2.setColor(Color.BLACK);
  			g2.fillRect(0,0,width,height);
  		}
  
  		for( Contour c : contours ) {
  			for(Point2D_I32 p : c.external ) {
  				out.setRGB(p.x,p.y,colorExternal);
  			}
  			for( List<Point2D_I32> l : c.internal ) {
  				for( Point2D_I32 p : l ) {
  					out.setRGB(p.x,p.y,colorInternal);
  				}
  			}
  		}
  
  		return out;
  	}
docs: Draws contours. Internal and external contours are different user specified colors.
  
  @param contours List of contours
  @param colorExternal RGB color
  @param colorInternal RGB color
  @param width Image width
  @param height Image height
  @param out (Optional) storage for output image
  @return Rendered contours