Package org.openpnp.spi

Examples of org.openpnp.spi.Camera.capture()


      double endY = Double.parseDouble(txtEndY.getText());
      // Calculate bounding box
      double width = Math.abs(endX - startX);
      double height = Math.abs(endY - startY);
      // Determine how many images are needed
      BufferedImage image = camera.capture();
      // Figure out how many units per image we are getting
      Location unitsPerPixel = camera.getUnitsPerPixel();
      unitsPerPixel = unitsPerPixel.convertToUnits(Configuration.get().getSystemUnits());
      double imageWidthInUnits = unitsPerPixel.getX() * image.getWidth();
      double imageHeightInUnits = unitsPerPixel.getY() * image.getHeight();
 
View Full Code Here


          camera.moveTo(location, 1.0);
        // Give the head and camera 500ms to settle
        Thread.sleep(500);
        // We capture two images to make sure that the one we save is
        // not coming from a previous frame.
        image = camera.capture();
        image = camera.capture();
        File outputFile = new File(outputDirectory,
            String.format(Locale.US, "%2.3f,%2.3f.png", location.getX(), location.getY()));
        ImageIO.write(image, "png",outputFile);
        progressBar.setValue(currentImage);
View Full Code Here

        // Give the head and camera 500ms to settle
        Thread.sleep(500);
        // We capture two images to make sure that the one we save is
        // not coming from a previous frame.
        image = camera.capture();
        image = camera.capture();
        File outputFile = new File(outputDirectory,
            String.format(Locale.US, "%2.3f,%2.3f.png", location.getX(), location.getY()));
        ImageIO.write(image, "png",outputFile);
        progressBar.setValue(currentImage);
        currentImage++;
View Full Code Here

    Point match = matchingPoints[0];
   
    // match now contains the position, in pixels, from the top left corner
    // of the image to the top left corner of the match. We are interested in
    // knowing how far from the center of the image the center of the match is.
    BufferedImage image = camera.capture();
    double imageWidth = image.getWidth();
    double imageHeight = image.getHeight();
    double templateWidth = vision.getTemplateImage().getWidth();
    double templateHeight = vision.getTemplateImage().getHeight();
    double matchX = match.x;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.