Package vash

Examples of vash.Plane


    float w = (float)this.width.getV();
    float h = (float)this.height.getV();
    float angle = (float)this.angle.getV();
    float twoOverSqrtTwo = (float)(2.0 / Math.sqrt(2.0));
   
    Plane out = ip.getPlane();

        // note: adjust the angle by -PI/2 so 0 is up
        float ca = (float)Math.cos((angle * Math.PI / 180.0) - (Math.PI / 2.0));
        float sa = (float)Math.sin((angle * Math.PI / 180.0) - (Math.PI / 2.0));

View Full Code Here


    float x = (float)this.center.getX();
    float y = (float)this.center.getY();
    float n = (float)Math.floor(this.n.getV());
    float b = (float)this.b.getV();

    Plane V = _children[0].compute(ip);
    Plane out = ip.getPlane();
      for(int j = 0; j < ip.getH(); j++ ) {
        y0 = Y[j] - y;
      for(int i = 0; i < ip.getW(); i++) {
        x0 = X[i] - x;
       
View Full Code Here

    return new Add(_children[0].clone(), _children[1].clone());
  }
 
  @Override
  public Plane compute(ImageParameters ip) {
    Plane A = _children[0].compute(ip);
    Plane B = _children[1].compute(ip);
    Plane out = ip.getPlane();
      for(int j = 0; j < ip.getH(); j++ ) {
      for(int i = 0; i < ip.getW(); i++) {
        out.data[i][j] = (A.data[i][j] + B.data[i][j]) / 2.0f;
      }
      }
View Full Code Here

    return new Invert(_children[0].clone());
  }

  @Override
  public Plane compute(ImageParameters ip) {
    Plane A = _children[0].compute(ip);
    Plane out = ip.getPlane();
      for(int j = 0; j < ip.getH(); j++ ) {
      for(int i = 0; i < ip.getW(); i++) {
        out.data[i][j] = -A.data[i][j];
      }
      }
View Full Code Here

    return new Flower(center.clone(), angle.clone(), size.clone(), ratio.clone(), n_points);
  }

  @Override
  public Plane compute(ImageParameters ip) {
    Plane out = ip.getPlane();
    float[] X = ip.getXValues();
    float[] Y = ip.getYValues();
    float x = (float)this.center.getX();
    float y = (float)this.center.getY();
    float angle = (float)this.angle.getV();
View Full Code Here

    float[] Y = ip.getYValues();
    float x0 = (float)p0.getX();
    float y0 = (float)p0.getY();
    float x1 = (float)p1.getX();
    float y1 = (float)p1.getY();
    Plane out = ip.getPlane();
    float denom;

    denom = x1 - x0;
    if(denom < 0.1f) {
      /*
       * Since we use the slope to compute the gradient, we have a nasty
       * singularity when the slope is infinite.  If the slope is near
       * infinite, we compute the gradient on the plane mirrored about
       * y=x and then flip the result back when we are done.
       */
      if(w == h) {
        _computeInternal(out, w, h, X, Y, y0, x0, y1, x1);
        Plane tmp = ip.getPlane();
        for(int j = 0; j < h; j++) {
          for(int i = 0; i < w; i++) {
            tmp.data[i][j] = out.data[j][i];
          }
        }
        ip.putPlane(out);
        out = tmp;
      } else {
        Plane yxOut = ip.getYXPlane();
        _computeInternal(yxOut, h, w, Y, X, y0, x0, y1, x1);
        for(int j = 0; j < h; j++) {
          for(int i = 0; i < w; i++) {
            out.data[i][j] = yxOut.data[(int)h - j - 1][(int)w - i - 1];
          }
View Full Code Here

  @Override
  public byte[] compute(ImageParameters ip, boolean this_method_is_different) {
    int w = ip.getW();
    int h = ip.getH();
    Plane R = _children[0].compute(ip);
    Plane G = _children[1].compute(ip);
    Plane B = _children[2].compute(ip);
    byte pix[] = new byte[w * h * 3];

    int index = 0;
    for (int y = h - 1; y >= 0; y--) {
        for (int x = 0; x < w; x++) {
View Full Code Here

    float x = (float)this.center.getX();
    float y = (float)this.center.getY();
    float r = (float)this.r.getV();
    float n = (float)this.n.getV();

    Plane A = _children[0].compute(ip);
    Plane B = _children[1].compute(ip);
    Plane out = ip.getPlane();
      for(int j = 0; j < ip.getH(); j++ ) {
        y0 = Y[j] - y;
      for(int i = 0; i < ip.getW(); i++) {
        x0 = X[i] - x;
        a = Math.abs(x0 - A.data[i][j]);
View Full Code Here

    return new Absolute(_children[0].clone());
  }

  @Override
  public Plane compute(ImageParameters ip) {
    Plane A = _children[0].compute(ip);
    Plane out = ip.getPlane();
      for(int j = 0; j < ip.getH(); j++ ) {
      for(int i = 0; i < ip.getW(); i++) {
        out.data[i][j] = Math.abs(A.data[i][j]);
      }
      }
View Full Code Here

TOP

Related Classes of vash.Plane

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.