Package utils.images

Examples of utils.images.RecognizedShape


        centroidY = (float)(polygonVerticesY[0] + polygonVerticesY[2])/2;
       
        int area = Math.abs(polygonVerticesX[2] - polygonVerticesX[0]) * (polygonVerticesY[2] - polygonVerticesY[0]);
       
        newIcons = new RecognizedShape[1];
        newIcons[0] = new RecognizedShape(centroidX,centroidY,bx,by,area,new Color(r,g,b),polygonVerticesX,polygonVerticesY,4);
      } else {
        imageUtils.recognizeShapes( r, g, b, 1000, 999999, ImageUtils.HIGH_ACCURACY );       
        newIcons = imageUtils.getRecognizedShapes();
      }
     
View Full Code Here


   
    // Busca el lugar pr�ximo en el arreglo de �conos coloreados.
    boolean encontrado = false;
    for (int i=0; !encontrado && i<Simulation.getCurrent().getGps().getMazeItems().recognizedColoredIcons.length; i++)
    {
      RecognizedShape icon = Simulation.getCurrent().getGps().getMazeItems().recognizedColoredIcons[i];
      if ( icon.shapeId.equals(String.valueOf(nextPlaceId)) )
      {
        // Establece el nuevo curso
        newCourse = Math.atan2( icon.y-state.position[1] , icon.x-state.position[0] ) - state.course;
        encontrado = true;
View Full Code Here

    canvas.redraw();
  }
 
  private org.eclipse.swt.graphics.Color getRecognizedIconColorById(Integer currentKey) {
    for (int i = 0; i < sceneItems.recognizedColoredIcons.length ; i++) {
      RecognizedShape r = sceneItems.recognizedColoredIcons[i];
      int compareValue = Integer.parseInt(r.shapeId);
      if(compareValue == currentKey) return new org.eclipse.swt.graphics.Color(Display.getDefault(), r.color.getRed(),r.color.getGreen(),r.color.getBlue());
    }
   
    return null;
View Full Code Here

    Simulation simulation = Simulation.getCurrent();
    RecognizedShape[] icons = simulation.getGps().getMazeItems().recognizedColoredIcons;
   
    Point originPoint = new Point(x,y);
    Point endPoint = new Point(x+w,y+h);
    RecognizedShape origin = null, end = null;
   
    for (int i = 0; i < icons.length; i++) {
      if(icons[i].contains(originPoint)) origin = icons[i];
      else if(icons[i].contains(endPoint)) end = icons[i];
    }
View Full Code Here

  }


  private RecognizedShape[] recognizeIconsByShape(int r, int g, int b, int x0, int y0, int x1, int y1) { 
    RecognizedShape[] newIcons = new RecognizedShape[1];   
    RecognizedShape rs = buildShapeByBox(r, g, b, x0, y0, x1, y1);
    newIcons[0]=rs;   
    return newIcons;
  }
View Full Code Here

    int[] xp = new int[4];
    int[] yp = new int[4];
    xp[0] = x0; xp[1] = x0; xp[2] = x1; xp[3] = x1;
    yp[0] = y0; yp[1] = y1; yp[2] = y1; yp[3] = y0;

    RecognizedShape rs = new RecognizedShape(xCentroid,yCentroid,bx,by,area,color,xp,yp,4);
    return rs;
  }
View Full Code Here

TOP

Related Classes of utils.images.RecognizedShape

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.