Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Getting started with OpenCV - getting single frames from Video

I am just getting started on using OpenCV using Python, and I will work with video. I have established connection to the web camera, using the script below. Now I would like to take out a couple of frames that can be analyzed. Is there some one who can help me get started on that?

I have the following code:

import cv2.cv as cv import time from scipy import * import numpy import sys, os, random, hashlib from math import *

cv.NamedWindow("camera", 1)

capture = cv.CaptureFromCAM(0)

while True: img = cv.QueryFrame(capture) cv.ShowImage("camera", img) if cv.WaitKey(10) == 27: break cv.DestroyAllWindows()

click to hide/show revision 2
No.2 Revision

Getting started with OpenCV - getting single frames from Video

I am just getting started on using OpenCV using Python, and I will work with video. I have established connection to the web camera, using the script below. Now I would like to take out a couple of frames that can be analyzed. Is there some one who can help me get started on that?

I have the following code:

import cv2.cv as cv
import time
from scipy import *
import numpy
import sys, os, random, hashlib
from math import *

*

cv.NamedWindow("camera", 1)

1) capture = cv.CaptureFromCAM(0)

cv.CaptureFromCAM(0)

while True: img = cv.QueryFrame(capture) cv.ShowImage("camera", img) if cv.WaitKey(10) == 27: break cv.DestroyAllWindows()

cv.DestroyAllWindows()
click to hide/show revision 3
retagged

Getting started with OpenCV - getting single frames from Video

I am just getting started on using OpenCV using Python, and I will work with video. I have established connection to the web camera, using the script below. Now I would like to take out a couple of frames that can be analyzed. Is there some one who can help me get started on that?

I have the following code:

import cv2.cv as cv
import time
from scipy import *
import numpy
import sys, os, random, hashlib
from math import *

cv.NamedWindow("camera", 1)
capture = cv.CaptureFromCAM(0)

while True:
    img = cv.QueryFrame(capture)
    cv.ShowImage("camera", img)
    if cv.WaitKey(10) == 27:
        break

cv.DestroyAllWindows()
click to hide/show revision 4
No.4 Revision

Getting started with OpenCV - getting single frames from Videovideo with python

I am just getting started on using OpenCV using Python, and I will work with video. I have established connection to the web camera, using the script below. Now I would like to take out a couple of frames that can be analyzed. Is there some one who can help me get started on that?

I have the following code:

import cv2.cv as cv
import time
from scipy import *
import numpy
import sys, os, random, hashlib
from math import *

cv.NamedWindow("camera", 1)
capture = cv.CaptureFromCAM(0)

while True:
    img = cv.QueryFrame(capture)
    cv.ShowImage("camera", img)
    if cv.WaitKey(10) == 27:
        break

cv.DestroyAllWindows()