video analysis with python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ashot

    video analysis with python

    Hi,

    I need to write a video analysis tool which extracts statistics from
    microsocope video. Essentially what I need is to translate the video data
    into numerical matrices. I have been using Python for the past 1.5 years
    anytime I could for absolutely everything, because it has every library
    imaginable... Alas, I can not find a library for decoding video/using
    codecs. The only solution I have been able to come up with is to create
    an image sequence and load those in with PIL, however this is not really
    feasible as the images are too large (nor is it proffessional).

    Is there a library or project that I have missed, or is there a way to
    incorporate something like vfw.lib directly? If there isn't I think this
    would be a pretty large whole in Python's arsenal. Thanks in advance for
    any help.

    --
    Ashot Petrosian
    University of Texas at Austin, Computer Sciences
  • Miki Tebeka

    #2
    Re: video analysis with python

    Hello Ashot,
    [color=blue]
    > I need to write a video analysis tool which extracts statistics from
    > microsocope video. Essentially what I need is to translate the video data
    > into numerical matrices. I have been using Python for the past 1.5 years
    > anytime I could for absolutely everything, because it has every library
    > imaginable... Alas, I can not find a library for decoding video/using
    > codecs. The only solution I have been able to come up with is to create
    > an image sequence and load those in with PIL, however this is not really
    > feasible as the images are too large (nor is it proffessional).
    >
    > Is there a library or project that I have missed, or is there a way
    > to incorporate something like vfw.lib directly? If there isn't I think
    > this would be a pretty large whole in Python's arsenal. Thanks in advance
    > for any help.[/color]

    1. There is PyMedia (http://pymedia.org/)
    2. Maybe you can use the code from VLC (http://www.videolan.org/vlc/)
    (using SWIG/PyBoost/Pyrex ...)

    HTH.
    --
    ------------------------------------------------------------------------
    Miki Tebeka <miki.tebeka@zo ran.com>

    The only difference between children and adults is the price of the toys

    Comment

    • Ashot

      #3
      Re: video analysis with python

      This helps alot! pyMedia looks perfect. I can't believe I couldn't find
      it after a full day of searching.. losing my touch

      On Sun, 16 Jan 2005 13:44:27 +0200, Miki Tebeka <miki.tebeka@zo ran.com>
      wrote:
      [color=blue]
      > Hello Ashot,
      >[color=green]
      >> I need to write a video analysis tool which extracts statistics from
      >> microsocope video. Essentially what I need is to translate the video
      >> data
      >> into numerical matrices. I have been using Python for the past 1.5 years
      >> anytime I could for absolutely everything, because it has every library
      >> imaginable... Alas, I can not find a library for decoding video/using
      >> codecs. The only solution I have been able to come up with is to create
      >> an image sequence and load those in with PIL, however this is not really
      >> feasible as the images are too large (nor is it proffessional).
      >>
      >> Is there a library or project that I have missed, or is there a way
      >> to incorporate something like vfw.lib directly? If there isn't I
      >> think
      >> this would be a pretty large whole in Python's arsenal. Thanks in
      >> advance
      >> for any help.[/color]
      >
      > 1. There is PyMedia (http://pymedia.org/)
      > 2. Maybe you can use the code from VLC (http://www.videolan.org/vlc/)
      > (using SWIG/PyBoost/Pyrex ...)
      >
      > HTH.
      > --
      > ------------------------------------------------------------------------
      > Miki Tebeka <miki.tebeka@zo ran.com>
      > http://tebeka.bizhat.com
      > The only difference between children and adults is the price of the toys[/color]



      --
      --
      Ashot Petrosian
      University of Texas at Austin, Computer Sciences

      Comment

      • Alexander 'boesi' Bösecke

        #4
        Re: video analysis with python

        Hi

        Am 16.01.2005 12:44:27 schrieb Miki Tebeka:
        [color=blue]
        > 1. There is PyMedia (http://pymedia.org/)[/color]

        Is this library able to extract single images from a video? AFAICS it
        can only convert videos from one format to another. But I didn't try it,
        I've looked only in the docu.

        Maybe pyVideo (http://www.geocities.com/rtrocca/python/) would be a
        solution. But for me the AVIFile-Module doesn't work stable, it
        regularly crashes the python-interpreter.

        And there is a library for accessing DirectShow called PyDShowCam.

        cu boesi
        --
        |¯|/¯/¯¯¯\|¯| |¯|¯| |¯|/¯/¯¯¯\|¯¯¯¯\|¯¯¯¯ | #1671 : icq-intern
        http://| / / /¯\ | | | | | | / / /¯\ | (¯) | |¯¯#73628288 : icq-extern
        smb://| \ \ \_/ | `¯´ | |__| \ \ \_/ | ¯ /| ¯| boesi111 : aim
        ftp://|_|\_\___/|_|¯|_|____|_|\ _\___/|_|¯¯ |_|¯ i171 : reallife

        Comment

        • Ashot

          #5
          Re: video analysis with python

          On Mon, 17 Jan 2005 08:08:46 +0100, Alexander 'boesi' Bösecke
          <boesi.josi@gmx .net> wrote:
          [color=blue]
          > Hi
          >
          > Am 16.01.2005 12:44:27 schrieb Miki Tebeka:
          >[color=green]
          >> 1. There is PyMedia (http://pymedia.org/)[/color]
          >
          > Is this library able to extract single images from a video? AFAICS it
          > can only convert videos from one format to another. But I didn't try it,
          > I've looked only in the docu.
          >
          > Maybe pyVideo (http://www.geocities.com/rtrocca/python/) would be a
          > solution. But for me the AVIFile-Module doesn't work stable, it
          > regularly crashes the python-interpreter.
          >
          > And there is a library for accessing DirectShow called PyDShowCam.
          >
          > cu boesi[/color]

          I haven't tried it yet, but yes its pretty full featured library, there is
          a tutorial here on extracting images:


          --
          Ashot Petrosian
          University of Texas at Austin, Computer Sciences

          Comment

          • Matthias Baas

            #6
            Re: video analysis with python

            On Mon, 17 Jan 2005 08:08:46 +0100, "Alexander 'boesi' Bösecke"
            <boesi.josi@gmx .net> wrote:[color=blue][color=green]
            >> 1. There is PyMedia (http://pymedia.org/)[/color]
            >
            >Is this library able to extract single images from a video? AFAICS it
            >can only convert videos from one format to another. But I didn't try it,
            >I've looked only in the docu.[/color]

            Yes, you can extract single images from a video. The package uses the
            avformat and avcodec libraries from ffmpeg and it provides rather low
            level access to video/audio files. You can access the individual
            streams in a file, obtain the stream data and decode the data therein.
            What you do with the data is up to your application. Converting the
            file into another format is just one such application.

            - Matthias -

            Comment

            Working...