← Back to team overview

sikuli-driver team mailing list archive

[Bug 897895] [NEW] Pattern class does not copy image on Pattern constructor

 

Public bug reported:

The class org.sikuli.script.Pattern does not copy the image for the
constructor which takes Pattern as the parameter.

public Pattern(Pattern p){
      imgURL = p.imgURL;
      similarity = p.similarity;
      dx = p.dx;
      dy = p.dy;
   }

Should also include image = p.image

The consequence is that when you do the following:

p = new Pattern( bufferedImage );
x = p.similarity( 0.9f ) or x = p.exact()

x no longer contains the image. Therefore it is not currently possible
to change the similarity when using a Pattern based on an image.

Another great thing would be to have a constructor which takes
BufferedImage and similarity.

** Affects: sikuli
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/897895

Title:
  Pattern class does not copy image on Pattern  constructor

Status in Sikuli:
  New

Bug description:
  The class org.sikuli.script.Pattern does not copy the image for the
  constructor which takes Pattern as the parameter.

  public Pattern(Pattern p){
        imgURL = p.imgURL;
        similarity = p.similarity;
        dx = p.dx;
        dy = p.dy;
     }

  Should also include image = p.image

  The consequence is that when you do the following:

  p = new Pattern( bufferedImage );
  x = p.similarity( 0.9f ) or x = p.exact()

  x no longer contains the image. Therefore it is not currently possible
  to change the similarity when using a Pattern based on an image.

  Another great thing would be to have a constructor which takes
  BufferedImage and similarity.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/897895/+subscriptions


Follow ups

References