Any normalizations of the features should be performed in the specific classes!

@param image
@return
@throws Exception
433610
public double[][] extractFeatures(BufferedImage image) throws Exception {
		long start = System.currentTimeMillis();
		double[][] features = extractFeaturesInternal(image);
		totalNumberInterestPoints += features.length;
		totalExtractionTime += System.currentTimeMillis() - start;
		return features;
	}
903866
public void setImage(final Image image) {
		ButtonModel model = getOrCreateComponentModel();
		model.image = image;
		model.imageUrl = null;
	}
1118524
protected double[][] extractFeaturesInternal(BufferedImage image) {
		ImageFloat32 boofcvImage = ConvertBufferedImage.convertFromSingle(image, null, ImageFloat32.class);
		// create the SIFT detector and descriptor in BoofCV v0.15
		ConfigSiftDetector conf = new ConfigSiftDetector(2, detectThreshold, maxFeaturesPerScale, 5);
		DetectDescribePoint<ImageFloat32, SurfFeature> sift = FactoryDetectDescribe.sift(null, conf, null,
				null);

		// specify the image to process
		sift.detect(boofcvImage);
		int numPoints = sift.getNumberOfFeatures();
		double[][] descriptions = new double[numPoints][SIFTLength];
		for (int i = 0; i < numPoints; i++) {
			descriptions[i] = sift.getDescription(i).getValue();
		}
		return descriptions;
	}
622691
public static void consumeBufferedImage(BufferedImage image, Processor processor, WebcamEndpoint endpoint, ExceptionHandler exceptionHandler) {
        Validate.notNull(image);
        Validate.notNull(processor);
        Validate.notNull(endpoint);
        
        try {
            Exchange exchange = createOutOnlyExchangeWithBodyAndHeaders(endpoint, image);
            processor.process(exchange);
        } catch (Exception e) {
            exceptionHandler.handleException(e);
        }
    }
316980
public function apply( $image ) {
        if ( $this->type === 'ordered' ) {
            return $this->ordered( $image );
        } else if ( $this->type === 'diffusion' ) {
            return $this->diffusion( $image );
        }
        throw new \Exception( sprintf( 'Invalid dither type "%s".', $this->type ) );
    }
1220455
public static BufferedImage rotate(BufferedImage image, int angle)
    {
        final int width = image.getWidth();
        final int height = image.getHeight();
        final int transparency = image.getColorModel().getTransparency();

        final Rectangle rectangle = new Rectangle(0, 0, width, height);
        rectangle.rotate(angle);

        final BufferedImage rotated = createImage(rectangle.getWidth(), rectangle.getHeight(), transparency);
        final Graphics2D g = rotated.createGraphics();

        optimizeGraphicsSpeed(g);
        g.rotate(Math.toRadians(angle), rectangle.getWidth() / 2.0, rectangle.getHeight() / 2.0);

        final double ox = rectangle.getWidth() - (double) width;
        final double oy = rectangle.getHeight() - (double) height;
        final double cos = UtilMath.cos(angle);
        final double sin = UtilMath.sin(angle);
        final double angleOffsetX = sin * ox + cos * oy;
        final double angleOffsetY = -sin * oy + cos * ox;

        g.drawImage(image, null, (int) ((ox - angleOffsetX) / 2.0), (int) ((oy - angleOffsetY) / 2.0));
        g.dispose();

        return rotated;
    }
974043
protected static BufferedImage toBufferedImage(Image image) {
        if (image instanceof BufferedImage) {
            return (BufferedImage) image;
        }

        // This code ensures that all the pixels in the image are loaded
        image = new ImageIcon(image).getImage();

        // Determine if the image has transparent pixels; for this method's
        // implementation, see e661 Determining If an Image Has Transparent
        // Pixels
        boolean hasAlpha = hasAlpha(image);

        // Create a buffered image with a format that's compatible with the
        // screen
        BufferedImage       bimage = null;
        GraphicsEnvironment ge     = GraphicsEnvironment.getLocalGraphicsEnvironment();

        try {

            // Determine the type of transparency of the new buffered image
            int transparency = Transparency.OPAQUE;

            if (hasAlpha) {
                transparency = Transparency.BITMASK;
            }

            // Create the buffered image
            GraphicsDevice        gs = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gs.getDefaultConfiguration();

            bimage = gc.createCompatibleImage(image.getWidth(null), image.getHeight(null), transparency);
        } catch (HeadlessException e) {
            // The system does not have a screen
        }

        if (bimage == null) {

            // Create a buffered image using the default color model
            int type = BufferedImage.TYPE_INT_RGB;

            if (hasAlpha) {
                type = BufferedImage.TYPE_INT_ARGB;
            }

            bimage = new BufferedImage(image.getWidth(null), image.getHeight(null), type);
        }

        // Copy image to buffered image
        Graphics g = bimage.createGraphics();

        // Paint the image onto the buffered image
        g.drawImage(image, 0, 0, null);
        g.dispose();

        return bimage;
    }
823520
protected double[][] extractFeaturesInternal(BufferedImage image) {
		ImageFloat32 boofcvImage = ConvertBufferedImage.convertFromSingle(image, null, ImageFloat32.class);

		// create the SURF detector and descriptor in BoofCV v0.15
		ConfigFastHessian conf = new ConfigFastHessian(detectThreshold, 2, maxFeaturesPerScale, 2, 9, 4, 4);
		DetectDescribePoint<ImageFloat32, SurfFeature> surf = FactoryDetectDescribe.surfStable(conf, null,
				null, ImageFloat32.class);
		// specify the image to process
		surf.detect(boofcvImage);
		int numPoints = surf.getNumberOfFeatures();
		double[][] descriptions = new double[numPoints][SURFLength];
		for (int i = 0; i < numPoints; i++) {
			descriptions[i] = surf.getDescription(i).getValue();
		}
		return descriptions;
	}
879975
public void setImage(T image) {
		blur.reshape(image.width,image.height);
		filterBlur.process(image,blur);
		describe.setImage(image);
	}
1006076
@Override
   public Image loadImage(URL image, float opacity) throws VectorPrintException {
      try {
         if (log.isLoggable(Level.FINE)) {
            log.fine(String.format("loading image from %s", String.valueOf(image)));
         }
         BufferedImage awtim = null;
         if ("file".equals(image.getProtocol())) {
            awtim = makeImageTranslucent(ImageIO.read(new File(image.getFile())), opacity);
         } else {
            awtim = makeImageTranslucent(ImageIO.read(image), opacity);
         }
         return Image.getInstance(awtim, null);
      } catch (BadElementException | IOException ex) {
         throw new VectorPrintException(String.format("unable to load image %s", image.toString()), ex);
      }
   }
464421
public static JComponent generateComponent(Image image) {

        if (image == null) {
            return new LabelUIResource("Image is null");
        }

        return SwingUtils.generateComponent(new ImageIcon(image));
    }
1018338
protected double[][] extractFeaturesInternal(BufferedImage image) {
		double[][] features = super.extractFeaturesInternal(image);
		for (int i = 0; i < features.length; i++) {
			Normalization.normalizePower(features[i], 0.5);
			Normalization.normalizeL2(features[i]);
		}
		return features;
	}
1058648
@Override
   public final void processImage(com.itextpdf.text.Image img) throws VectorPrintException {
      applySettings(img);
      for (BaseStyler bs : stylers) {
         // these stylers are configured in the setup after this importing stylers, apply here
         if (bs.canStyle(img) && bs.shouldStyle(data, img)) {
            bs.style(img, data);
         }
      }
      
      if (getValue(SEPARATE_PAGE, Boolean.class)) {
         if (getValue(FITTOIMAGE, Boolean.class)) {
            getDocument().setPageSize(new Rectangle(img.getScaledWidth(), img.getScaledHeight()));
         } else if (getValue(FITTOPAGE, Boolean.class)) {
            img.scaleToFit(getDocument().getPageSize().getWidth(),getDocument().getPageSize().getHeight());
         }
         if (getValue(NOFOOTER, Boolean.class)) {
            getSettings().put(ReportConstants.PRINTFOOTER, "false");
         }
         getDocument().newPage();
      }
      if (getValue(DRAWDIRECT, Boolean.class)) {
         this.imageBeingProcessed = img;
         drawOnPage(imageBeingProcessed);
         this.imageBeingProcessed = null;
      } else {
         addToDocument(img);
      }
   }
1111249
private static byte[] getByteArray(BufferedImage image) {
    checkNotNull(image);

    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    try {
      ImageIO.write(image, "png", stream);
    } catch (IOException e) {
      throw new IllegalStateException(e);
    }

    return stream.toByteArray();
  }
474738
public static boolean isAllOneColor( BufferedImage image ) {
        int width = image.getWidth();
        int height = image.getHeight();
        int previousRgb = 0;
        boolean isFirst = true;
        for( int x = 0; x < width; x++ ) {
            for( int y = 0; y < height; y++ ) {
                int rgb = image.getRGB(x, y);
                if (isFirst) {
                    isFirst = false;
                } else {
                    if (rgb != previousRgb) {
                        return false;
                    }
                }
                previousRgb = rgb;
            }
        }
        return true;
    }
849351
public static<T extends ImageGray<T>, D extends ImageGray<D>>
	void detectLineSegments( BufferedImage image ,
							 Class<T> imageType ,
							 Class<D> derivType )
	{
		// convert the line into a single band image
		T input = ConvertBufferedImage.convertFromSingle(image, null, imageType );

		// Comment/uncomment to try a different type of line detector
		DetectLineSegmentsGridRansac<T,D> detector = FactoryDetectLineAlgs.lineRansac(40, 30, 2.36, true, imageType, derivType);

		List<LineSegment2D_F32> found = detector.detect(input);

		// display the results
		ImageLinePanel gui = new ImageLinePanel();
		gui.setImage(image);
		gui.setLineSegments(found);
		gui.setPreferredSize(new Dimension(image.getWidth(),image.getHeight()));

		listPanel.addItem(gui, "Found Line Segments");
	}
460613
public static Graphics getGraphicsForImage(Image image) throws SlickException {
		Graphics g = (Graphics) graphics.get(image.getTexture());
		
		if (g == null) {
			g = createGraphics(image);
			graphics.put(image.getTexture(), g);
		}
		
		return g;
	}