Tabnine Logo
PApplet.color
Code IndexAdd Tabnine to your IDE (free)

How to use
color
method
in
processing.core.PApplet

Best Java code snippets using processing.core.PApplet.color (Showing top 13 results out of 315)

origin: mirador/mirador

public int color(int gray, int alpha) {
 return intf.app.color(gray, alpha);
}
origin: poqudrof/PapARt

int defaultColor = this.parentApplet.color(1, 1, 1);
int defaultColor2 = javaToNativeARGB(defaultColor);
for (TrackedDepthPoint touch : touchs) {
      int c = this.parentApplet.color(dde.normal.x, dde.normal.y, dde.normal.z);
      int c2 = javaToNativeARGB(c);
      colorsJava[nbColors++] = c2;
origin: mirador/mirador

public int color(int v1, int v2, int v3) {
 return intf.app.color(v1, v2, v3);
}
origin: poqudrof/PapARt

public void updateWithIDColors(DepthAnalysisImpl kinect, ArrayList<TrackedDepthPoint> touchs) {
  Vec3D[] points = kinect.getDepthPoints();
  nbVertices = 0;
  nbColors = 0;
  int k = 0;
  parentApplet.pushStyle();
  parentApplet.colorMode(HSB, 8, 100, 100);
  int id = 0;
  for (TrackedDepthPoint touch : touchs) {
    int c = this.parentApplet.color(id % 8, 100, 100);
    int c2 = javaToNativeARGB(c);
    id++;
    for (DepthDataElementProjected dde : touch.getDepthDataElements()) {
      Vec3D p = dde.depthPoint;
      verticesJava[k++] = p.x;
      verticesJava[k++] = p.y;
      verticesJava[k++] = -p.z;
      verticesJava[k++] = 1;
      nbVertices++;
      colorsJava[nbColors++] = c2;
    }
  }
  parentApplet.popStyle();
  verticesNative.rewind();
  verticesNative.put(verticesJava, 0, nbVertices * 4);
  colorsNative.rewind();
  colorsNative.put(colorsJava, 0, nbColors);
}
origin: mirador/mirador

public int color(float v1, float v2, float v3, float alpha) {
 return intf.app.color(v1, v2, v3, alpha);
}
origin: poqudrof/PapARt

float g = ((float) out[1] - y) / mag + 0.5f;// / frameHeight; 
mapImg.pixels[k++] = parent.color(r, g, parent.random(1f));
origin: mirador/mirador

public int color(int v1, int v2, int v3, int alpha) {
 return intf.app.color(v1, v2, v3, alpha);
}
origin: mirador/mirador

public int color(float v1, float v2, float v3) {
 return intf.app.color(v1, v2, v3);
}
origin: mirador/mirador

public int color(int gray) {
 return intf.app.color(gray);
}
origin: mirador/mirador

public int color(float fgray) {
 return intf.app.color(fgray);
}
origin: mirador/mirador

public int color(float fgray, float falpha) {
 return intf.app.color(fgray, falpha);
}
origin: openimaj/openimaj

  /**
   * Detect faces using {@link HaarCascadeDetector}, return an {@link ArrayList} of
   * {@link PShape} instances. Note the {@link PShape} instances have no fill and
   * a colour: 255,0,0
   * @return detected faces
   */
  public ArrayList<PShape> faces(){
    ArrayList<PShape> faces = new ArrayList<PShape>();
    List<DetectedFace> detected = faceDetector.detectFaces(oiImage.flatten());
    for (DetectedFace detectedFace : detected) {
      Rectangle bounds = detectedFace.getBounds();
      PShape detectedPShape = this.parent.createShape(RECT,bounds.x,bounds.y,bounds.width,bounds.height);

      detectedPShape.setFill(false);
      detectedPShape.setStroke(this.parent.color(255f, 0, 0));
      faces.add(detectedPShape);
    }
    return faces;
  }
}
origin: poqudrof/PapARt

/**
 * Simple visualization
 *
 * @param depth
 * @param color
 * @param skip
 * @return
 */
public PImage update(IplImage depth, IplImage color, int skip) {
  updateRawDepth(depth);
  if (color != null) {
    updateRawColor(color);
  }
  depthData.clear();
  depthData.timeStamp = papplet.millis();
  validPointsPImage.loadPixels();
  // set a default color. 
  Arrays.fill(validPointsPImage.pixels, papplet.color(0, 0, 0));
  // TODO: get the color with Kinect2... 
  if (this.colorCamera.getPixelFormat() == Camera.PixelFormat.RGB) {
    computeDepthAndDo(skip, new SetImageDataRGB());
  }
  if (this.colorCamera.getPixelFormat() == Camera.PixelFormat.BGR) {
    computeDepthAndDo(skip, new SetImageData());
  }
  validPointsPImage.updatePixels();
  return validPointsPImage;
}
processing.corePAppletcolor

Popular methods of PApplet

  • constrain
  • createGraphics
    Create an offscreen graphics surface for drawing, in this case for a renderer that writes to a file
  • loadStrings
    ( begin auto-generated from loadStrings.xml ) Reads the contents of a file or url and creates a Stri
  • saveStrings
    ( begin auto-generated from saveStrings.xml ) Writes an array of strings to a file, one line per str
  • abs
  • createImage
    ( begin auto-generated from createImage.xml ) Creates a new PImage (the datatype for storing images)
  • createShape
  • createWriter
    ( begin auto-generated from createWriter.xml ) Creates a new file in the sketch folder, and a PrintW
  • loadImage
  • main
    main() method for running this class from the command line. Usage: PApplet [options] [s
  • max
  • parseInt
  • max,
  • parseInt,
  • random,
  • round,
  • split,
  • sqrt,
  • unhex,
  • arrayCopy,
  • ceil,
  • checkExtension

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • Menu (java.awt)
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now