Examples of grab()


Examples of com.googlecode.javacv.OpenCVFrameGrabber.grab()

      /*
       * this loop is so that the camera is given time to adjust to
       * lighting to get a good first frame for the motion detection.
       */
      warmup(grabber);
      IplImage firstFrame = grabber.grab();
      // send the first frame to the motionDetect Constructor
      MotionDetect detector = new MotionDetect(firstFrame);
      IplImage currFrame;

      while (true) {
View Full Code Here

Examples of com.googlecode.javacv.OpenCVFrameGrabber.grab()

      // send the first frame to the motionDetect Constructor
      MotionDetect detector = new MotionDetect(firstFrame);
      IplImage currFrame;

      while (true) {
        currFrame = grabber.grab();
        if (currFrame != null) {
          if (detector.Detect(currFrame)) {
            /*
             * hand over control of webcam to the record video
             * method to capture the frames for the 30 second movie
View Full Code Here

Examples of com.googlecode.javacv.OpenCVFrameGrabber.grab()

            grabber.stop();
            recordVideo();
            // take control back of the webcam
            grabber.start();
            warmup(grabber);
            IplImage newbackground = grabber.grab();
            detector.setBackground(newbackground);
          }
        }
      }
    } catch (Exception e) {
View Full Code Here

Examples of com.googlecode.javacv.OpenCVFrameGrabber.grab()

    OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0);
    grabber.setFrameRate(frameRate);
    grabber.start();
    int numOfFrames = 0;
    int maxFramesIn10Seconds = 100;
    IplImage currFrame = grabber.grab();
    int height = currFrame.height();
    int width = currFrame.width();
    try {
      while (numOfFrames < maxFramesIn10Seconds) {
        if (currFrame != null) {
View Full Code Here

Examples of com.googlecode.javacv.OpenCVFrameGrabber.grab()

          String FileName = i + ".jpg";
          cvSaveImage(FileName, currFrame);
          numOfFrames++;

        }
        currFrame = grabber.grab();
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    grabber.stop();
View Full Code Here

Examples of com.googlecode.javacv.OpenCVFrameGrabber.grab()

      IplImage currFrame;
      grabber.start();
      long now = System.currentTimeMillis();
      // for 10 seconds
      while (System.currentTimeMillis() - now < 10000) {
        currFrame = grabber.grab();
        if (currFrame != null) {
          // 90_degrees_steps_anti_clockwise
          cvFlip(currFrame, currFrame, 1);// l-r =
          // show image on window
          canvas.showImage(currFrame);
View Full Code Here

Examples of com.googlecode.javacv.OpenCVFrameGrabber.grab()

    grabber.start();
    BackgroundSubtractorMOG backsub = new BackgroundSubtractorMOG();
    CvMemStorage storage = CvMemStorage.create();
   
    while(true) {
      IplImage img = grabber.grab();
      IplImage fgmask = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
      backsub.apply(img, fgmask, 0.01);
     
      CvSeq contours = new CvSeq();
      cvFindContours(fgmask, storage, contours, Loader.sizeof(CvContour.class), CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);
View Full Code Here

Examples of com.googlecode.javacv.OpenCVFrameGrabber.grab()

    public CameraDetection() {
        OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0);
        try {
            grabber.start();
            IplImage frame = grabber.grab();
            canvasFrame = new CanvasFrame("Camera Detecção");
            canvasFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            canvasFrame.setCanvasSize(frame.width(), frame.height());
           
            CvMemStorage storage = CvMemStorage.create();
View Full Code Here

Examples of com.googlecode.javacv.OpenCVFrameGrabber.grab()

           
            int detectionCount = 0;
           
            CvSeq faces = null;

            while (canvasFrame.isVisible() && (frame = grabber.grab()) != null) {
                cvSmooth(frame, frame, CV_GAUSSIAN, 9, 9, 2, 2);
               
                detectionCount++;
                if (detectionCount > 5) {
                    detectionCount=0;
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.SerializedParameterization.grab()

    final ClassParameter<Object> DESCRIPTION_PARAM = new ClassParameter<Object>(OptionID.DESCRIPTION, Object.class, true);
    final StringParameter DEBUG_PARAM = new StringParameter(OptionID.DEBUG, true);

    SerializedParameterization params = new SerializedParameterization(args);
    try {
      params.grab(HELP_FLAG);
      params.grab(HELP_LONG_FLAG);
      params.grab(DESCRIPTION_PARAM);
      params.grab(DEBUG_PARAM);
      if(DESCRIPTION_PARAM.isDefined()) {
        params.clearErrors();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.