Ask Your Question

Kea's profile - activity

2020-06-01 06:32:28 -0600 received badge  Popular Question (source)
2017-09-26 04:35:04 -0600 received badge  Famous Question (source)
2014-11-06 03:01:06 -0600 received badge  Notable Question (source)
2014-01-23 03:44:31 -0600 received badge  Popular Question (source)
2012-07-28 06:33:50 -0600 commented answer Line detection and timestamps, video, Python

Thanks a lot! I will look at it.

2012-07-27 05:56:46 -0600 asked a question Line detection and timestamps, video, Python

I am working on a scientific project. I am trying to figure out how to calculate the melting speed of ice cores by use of OpenCv and Python. The ice cores melt downwards.

To simplify the problem I would like first to detect pencil lines (5 cm between each of them) on a piece of paper that is moving downwards. Every time a line passes a certain point, a timestamp must be made and send to a log file.From that information the speed will be calculated. Later the lines will be made on the ice cores.

I need to get started, so I have looked at the sample files that come with the OpenCV library, and I found the facedetect.py example. Could this sample be uses and adjusted to detect lines instead of faces? Or is there a better sample to look at?

Thank you!

2012-07-27 04:21:06 -0600 received badge  Scholar (source)
2012-07-26 02:53:26 -0600 commented answer Getting single frames from video with python

Thank you!

2012-07-26 02:53:09 -0600 commented answer Getting single frames from video with python

Thank you!

2012-07-26 02:49:24 -0600 answered a question Getting single frames from video with python

Thanks a lot. That cleared up something. The following code will take a snapshot with the web cam and save it in the directory of the code:

import cv2.cv as cv
import time

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

while True:
    img = cv.QueryFrame(capture)
    # cv.ShowImage("camera", img)

    cv.SaveImage('test1.jpg', img)

    if cv.WaitKey(10) == 27:
        break
cv.DestroyAllWindows()
2012-07-26 02:44:52 -0600 received badge  Student (source)
2012-07-25 04:19:00 -0600 asked a question Getting single frames from video 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()