Package org.opencv.core

Examples of org.opencv.core.Scalar


    private void locateTemplateMatchesDebug(Mat roiImage, Mat templateImage, org.opencv.core.Point matchLoc) {
        if (logger.isDebugEnabled()) {
            try {
                Core.rectangle(roiImage, matchLoc, new org.opencv.core.Point(matchLoc.x + templateImage.cols(),
                        matchLoc.y + templateImage.rows()), new Scalar(0, 255, 0));               
               
                BufferedImage debugImage = OpenCvUtils.toBufferedImage(roiImage);
                File file = Configuration.get().createResourceFile(
                        OpenCvVisionProvider.class, "debug_", ".png");
                ImageIO.write(debugImage, "PNG", file);
View Full Code Here


   * @param amt
   *       Amount of contrast to apply. 0-1.0 reduces contrast. Above 1.0 increases contrast.
   *
   **/
  public void contrast(float amt){
    Scalar modifier;
    if(useColor){
      modifier = new Scalar(amt,amt,amt,1);

    } else{
      modifier = new Scalar(amt);
    }
   
    Core.multiply(getCurrentMat(), modifier, getCurrentMat());
  }
View Full Code Here

   * @param amt
   *       The amount to brighten the image. Ranges -255 to 255.
   *
   **/ 
  public void brightness(int amt){
    Scalar modifier;
    if(useColor){
      modifier = new Scalar(amt,amt,amt, 1);

    } else{
      modifier = new Scalar(amt);
    }
   
    Core.add(getCurrentMat(), modifier, getCurrentMat());
  }
View Full Code Here

   *
   * @param lowerBound
   * @param upperBound
   */
  public void inRange(int lowerBound, int upperBound){
    Core.inRange(getCurrentMat(), new Scalar(lowerBound), new Scalar(upperBound), getCurrentMat());
  }
View Full Code Here

TOP

Related Classes of org.opencv.core.Scalar

Copyright © 2018 www.massapicom. 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.