Package com.googlecode.javacv

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


                                // camera
    movieNum = 1;
    try {

      // start getting images from the webcam
      grabber.start();
      /*
       * 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);
 
View Full Code Here


             * method to capture the frames for the 30 second movie
             */
            grabber.stop();
            recordVideo();
            // take control back of the webcam
            grabber.start();
            warmup(grabber);
            IplImage newbackground = grabber.grab();
            detector.setBackground(newbackground);
          }
        }
View Full Code Here

    int frameRate = 10;

    // get the camera, 0 is default camera
    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();
View Full Code Here

    OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0); // 1 for next
    CanvasFrame canvas = new CanvasFrame("You have 10 seconds to position the camera then 10 seconds to leave the room");
    try {
      IplImage currFrame;
      grabber.start();
      long now = System.currentTimeMillis();
      // for 10 seconds
      while (System.currentTimeMillis() - now < 10000) {
        currFrame = grabber.grab();
        if (currFrame != null) {
View Full Code Here

  public static void main(String[] args) throws Exception {
    CanvasFrame frame = new CanvasFrame("Track");
   
    OpenCVFrameGrabber grabber = OpenCVFrameGrabber.createDefault("../track/Balcony4_Vis.mpg");
    grabber.start();
    BackgroundSubtractorMOG backsub = new BackgroundSubtractorMOG();
    CvMemStorage storage = CvMemStorage.create();
   
    while(true) {
      IplImage img = grabber.grab();
View Full Code Here

    protected CanvasFrame canvasFrame;

    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());
           
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.