[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave and live capturing camera

From: Søren Hauberg
Subject: Re: Octave and live capturing camera
Date: Thu, 04 Dec 2008 08:24:17 +0100

lør, 29 11 2008 kl. 07:55 -0800, skrev Wydou:
> Thank you guys for the answers.
> You are right, Søren, Octave is not fast, especially on an old G4 PowerBook,
> and therefor not the first choice for realtime applications... :-)

This is because Octave (and Matlab) are interpreted languages with no
static types. These kinds of programming languages are currently not
fast enough if you actually want to do image processing in real-time.

> I think Matlab has realtime functionality (probably within an extra
> package), and that's why I thought about such functions in Octave.

I truly doubt Matlab has this functionality. If all you want to do is
something like a simple thresholding of your images, then you might be
able to get it going in Octave. But you probably won't be able to extend
it to do anything useful. The same thing goes for Matlab. These kinds of
tools are not meant for real-time processing.

>  For quick
> prototyping would it be nice to have something like that, as setting up an
> OpenCV project with picture / video display possibilities on a mac is quite
> time-consuming.

Have you actually looked at OpenCV? An application that shows images
from a live camera feed, takes approximately 10 lines of easy-to-write
code. Of the top of my head, that code would look like this

int main (int argc, char *argv)
  cvNamedWindow ("feed", CV_WINDOW_AUTOSIZE);
  CvCapture *cam = cvCaptureFromCam (-1);

  while (cvWaitKey (-1) != 'q')
      IplImage *im = cvQueryCapture (cam);
      cvShowImage ("feed", im);

  return 0;

I haven't checked if that code works, but it shows the basics of how you
do such things. If you decide to use OpenCV, please seek help at the
OpenCV mailing list.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]