Access To Frame Data On Windows
This document describes two ways of accessing data written in the frame format on a Windows machine.
Compiling The frame library Using Cygwin And Gcc
- Install cygwin on your machine. You can download cygwin from www.cygwin.com
- Download the Zip-archive v4r31.zip (659 KB) from this server and extract it.
- This archive contains the script makeccwin in the directory \v4r31\mgr. This script compiles and builds the library libFrame.a and also compiles some example files. The created files are written to the directory /v4r31/kbk. So just type the following commands to start the process:
cd v4r31/mgr ./makeccwin
- To compile your own programs you can use the command
gcc -O -Wall -fPIC -fno-rtti -DFRIOCFILE -o YourExeFile ../src/YourSourceFile.c -I../src -I../src/zlib libFrame.a -lm
This assumes, that your source file is copied to the v4r31/src directory and is called YourSourceFile.c. The current directory should be v4r31/kbk (or any other directory below v4r31). The executable will be called YourExeFile.exe.
If you have questions about this you can contact Karsten Kötter.
Matlab frame access on Windows
You can use the following dlls to read frame data into Matlab. Just copy them into your Matlab path and you can use the functions frextract and frgetvect in Matlab. The dlls were compiled from the frame library source code with MS Visual C++ 6.0.
To compile your own stuff with MSVC++ the following steps are necessary:
- First comment out line 8 in the the file "FrIO.c"
/* #include <unistd.h> */
- Then create the libFrame.lib:
cl /c FrameL.c FrIO.c zlib/*.c /Izlib lib /OUT:libFrame.lib *.obj
- Set up the Matlab mex command to run with MSVC++ if you have not done this already
(In MATLAB) mex -setup
- Then you can use the Matlab mex command to compile your C-source-code and create a dll.
(In MATLAB) mex YourSouceFileName.c ../src/libFrame.lib -I../src
This will create a dll called YourSouceFileName.dll that can be run in Matlab.
If you have questions about this you can contact Martin Hewitson or Karsten Kötter.

