PFM files are mxnx1 or mxnx3 arrays of floats. C++ code to read/write the format (public domain).
Monday, April 30, 2007
Wednesday, April 04, 2007
To convert a video to a format that OpenCV can read:
$ mencoder in.avi -ovc raw -vf format=i420 -o out.aviThis is necessary because OpenCV uses platform specific video libraries, and the intersection of their supported formats is DIB/I420/IYUV. To capture input from a camera or an AVI file, use the following C++ code: . To capture frames in a nonblocking manner in Python, use:  with Gary Bishop's
Tuesday, April 03, 2007
def bwt(s):The Burrows-Wheeler transform  is an invertible mathematical transformation which tends to clump related sequences of data together; hence it is useful as a pre-pass for some compression algorithms. The BWT domain in the above code excludes the null character; to include the null character, modify the transformation to also output the row of
s = s + '\0'
return ''.join([x[-1] for x in
sorted([s[i:] + s[:i] for i in range(len(s))])])
L = [''] * len(s)
for i in range(len(s)):
L = sorted([s[i] + L[i] for i in range(len(s))])
return [x for x in L if x.endswith('\0')][:-1]
sorted([s[i:] + s[:i]...])on which
soccurs, then in IBWT simply return this row after the for loop. The Python code above is not particularly fast.
Sunday, April 01, 2007
Install FFMPEG , use
ffmpeg -i in.avi out.swf, then place
<embed src="out.swf" width="400" height="300" loop="false" quality="high"></embed>in your HTML. Optionally, use the
-iin FFMPEG to change the resolution. If you want playback controls, output to a
.flvfile instead, download FlowPlayer , and modify their example HTML to point to your