Loading ...
Sorry, an error occurred while loading the content.

How to connect CumCam3 at the robot or make cumcam2 work better

Expand Messages
  • Vunvulea Radu
    Where can i found a library for java for cumcam3? Can someone help me please. Or how can i make camera cumcam2 read the color better. I just have to read if is
    Message 1 of 1 , Dec 11, 2008
    • 0 Attachment
      Where can i found a library for java for cumcam3? Can someone help me
      please.

      Or how can i make camera cumcam2 read the color better. I just have to
      read if is blue/green or red, but the camera read almost all the time
      green or nothing.

      What i make wrong? Tks for help.
      The algorithm for Red is:
      public boolean isRed()
      { try {

      camera.setRGBMode(false);
      camera.setWhiteBalance(true);
      camera.setAutoExposure(true);
      Thread.sleep(5000); // let the sensor adjust
      camera.setWhiteBalance(false); // disable further adjustment
      camera.setAutoExposure(false);
      camera.trackRed();
      Thread.sleep(5000);
      } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      }
      CMUcamTrackingData trackingData = camera.getTrackingData();
      Display(1,"ros "+Integer.toString(trackingData.confidence));
      if (trackingData.confidence> CONSTANTA_INCREDERE)
      return true;
      else return false;

      }
    Your message has been successfully submitted and would be delivered to recipients shortly.