Video analysis with numpy...

Magnus L. Hetland mlh at vier.idi.ntnu.no
Mon Dec 6 19:42:45 EST 1999


"Fredrik Lundh" <fredrik at pythonware.com> writes:

> Travis Oliphant <olipt at mayo.edu> wrote:
[...]
> > Packaged with that module is another tool that I use frequently called
> > numpyio.  It reads arbitrary binary data directly into numpy
> arrays. 

Sounts quite interesting... (Then I just have to convert some
image/video format into numpy array format ;)

> > 
> > You didn't mention what format your files are in.

Any format, I guess. If I can get the frames stored as separate
images, I can just use ImageMagick (or PythonMagick) to convert them.

> > I have used the PIL to
> > read and write various image data formats before. It would be really nice
> > if the PIL interoperated even more smoothly with NumPy arrays

Yes...

> 
> an interesting exercise would be to write an image
> loader that used PIL's "tile descriptor" mechanism
> together with numpyio to read data directly into a
> numpy array.

I quess that would be something of great use to me... Maybe that makes
me a likely candidate for implementing it... But I'm sure there are
people out there who know this module better than me, and would need
less work to make it...

As an aside - maybe there should be a Python pixmap-format? The xpm
format writes pixmaps in C syntac, which makes it possible to include
the images directly in the code... Maybe it would be interesting to do
something like that in Python? (A parallel to the xpm would be quite
simple, I guess...) At least then you wouldn't need any modules to
read the images. Oh, well...

> > but you can
> > always go back and forth between the two using the fromstring() functions
> > and the tostring() methods of the two packages.

IC.

> it would be *very* nice if the multiarray module was
> added to the python core...

Yes, yes, yessss!

(Now *that* would be somtething to brag about tho those P**l-guys ;)

> (any volunteers?)

Err...

> 
> </F>
> 

--

  Magnus          Echelon jamming noise:
  Lie             FBI CIA NSA Handgun Assault Bomb Drug Terrorism
  Hetland         Special Forces Delta Force AK47 Hillary Clinton 



More information about the Python-list mailing list