feature-tracking
所属分类:图形图像处理
开发工具:matlab
文件大小:14KB
下载次数:81
上传日期:2007-12-04 16:36:39
上 传 者:
luoxiao002
说明: 一个用于电子显微镜下运动细胞的识别跟踪的源代码,出自哈佛医学院的一位教授,对于做物体运动识别估计的各位很有帮助!
(Under an electron microscope for cell identification and tracking movement of the source code, from a professor at Harvard Medical School, for the movement of objects do you identify the estimated useful!)
文件列表:
trackmovie_wrapped.m (1132, 2003-05-06)
trackstats.m (2245, 2003-09-26)
velocityjdj.m (1362, 2003-05-06)
ExampleInput.txt (678, 2004-01-21)
track_stuff_queued.m (1982, 2003-05-20)
track_stuff_queued_movie.m (1981, 2003-05-20)
trackbeads.m (3924, 2003-04-29)
Particle/Bacterial Tracking Software
Readme File
================================================================================
Contents:
--------------------
I. Copyright notice
II. Introduction
III. Requirements
IV. Installation
V. File Formats
VI. Syntax and Examples
VII. Notes
VIII. Included F-iles
--------------------
I. Copyright notice
This software is copyright (C)2003 Nicholas Darnton, Jacob D. Jaffe,
and the President and Fellows of Harvard University. It may be redistributed
freely providing that this copyright notice is included and the software remains
in its original, unmodified form. The end user may modify the software for their
own needs but ANY MODIFIED VERSION OF THE SOFTWARE MAY NOT BE REDISTRIBUTED.
The software is provided "as is" with no guarantees of performance, functionality,
compatibility, or technical support. Use of this software is at your own risk.
--------------------
II. Introduction
This software was designed by Nicholas Darnton for purposes of tracking
small fluorescent beads in a microscope field over time. It does so by using a
"nearest neighbor" approach comparing adjacent frames in a movie file.
This version is modified for tracking gliding bacteria in a microscope field.
In general, it should be able to track any moving object(s) in a movie provided
that there is sufficient contrast between the object(s) being tracked and the
background of the image. Particular applications may require the end user to
modify various parameters.
This software is a series of scripts to be run in MATLAB and is not a
stand-alone software package. This version is designed to accept a "queue" file
of movie analysis tasks to make automated measurements easier. Operation of
the queueing system will be described later in (V.) File Formats.
The basic input to the program is a movie file and the program will
output the average velocity and standard deviation of the objects tracked
in the analysis period. It will also report the number of objects tracked as
well as the number that are considered to be moving (with velocity above a user
defined threshold). The user also supplies various ancillary data such as scale
and contrast thresholding value. The program does not generally differentiate
between types of objects being tracked - i.e., big objects will be lumped
together with small ones. Again, this may be modified with some tweaks to
the scripts at the user's discretion and peril. Optionally, the program can
output a movie with the tracks it drew overlaid onto the original frames.
--------------------
III. Requirements
This software requires a functional copy of MATLAB with the MATLAB
Image Analysis Toolbox installed. It was developed and tested with version
6.5 release 13 but may work on other versions. MATLAB may be obtained from
The Mathworks (www.mathworks.com).
This software has been successfully executed in both Windows and MacOS
environments. It may work in other environments as well, provided that MATLAB
is also functional in that environment. These instructions and examples are
written from the Windows PC point of view. You may need to modify accordingly
for other platforms.
Movie files are required to be AVI format with INDEO Video 5.10 com-
pression. You may wish to use a program such as Adobe Premier to convert any
other movie file format into the required format. This version assumes that you
will be tracking DARK OBJECTS on a LIGHT BACKGROUND.
--------------------
IV. Installation
Simply unzip the files into a directory. Then run your MATLAB program
and make the "Current Directory" the one where you unzipped the files.
This archive also includes an example movie and an example queue file
to help get you started. Move the files "ExampleMovie-Indeo.avi" and
"ExampleInput.txt" to the directory C:\TEMP, creating it if it does not
already exist.
--------------------
V. File Formats
INPUT FILES:
Movie Files:
Must be in AVI format with Indeo video 5.10 compression.
- use Adobe Premier or equivalent to interconvert file formats.
- This version assumes that youwill be tracking DARK OBJECTS
on a LIGHT BACKGROUND.
Queue File:
The queue file is a tab-delimited text file where each row is a separate
analysis task and the columns are defined as follows (see "ExampleInput.txt"
for an example):
Column 1: Output directory (full path, with trailing \) (string)
Column 2: Analysis task label (string)
Column 3: Full path and file name of the movie input file (string)
Column 4: Analysis task label 2 (should be duplicate of column 2) (string)
Column 5: Threshold value (a decimal from 0.0 to 1.0)
- this number scales onto the 256 possible gray levels
and determines the thresholding cutoff for objects
to include as the image is converted to a binary
equivalent. 0.5 is generally OK.
Column 6: First frame to analyze (w/r/t movie file in Col. 3) (integer)
Column 7: Last frame to analyze (w/r/t movie file in Col. 3) (integer)
Column 8: Frame rate of movie (frames / sec) (decimal or integer)
Column 9: Scale of movie (pixels / unit length) (decimal)
Column 10: Search radius (How many unit lengths to search from one
frame to the next for the same objects. This can be a decimal.
Small for slow objects, larger for fast objects.) (decimal)
Column 11: Minium number of contiguous frames that an object must be
detected in to be considered "real." (integer)
Column 12: Velocity threshold (in unit lengths / sec) that an object must
be going to be considered "moving." (decimal)
Column 13: Velocity thresholding state (0 for off, 1 for on) - sets whether
velocity thresholding is performed. If it is "off," even
stationary objects will be reported in the average speed. If it
is on, only objects with velocity greater than that specified in
Col. 12 will be included in average speed calculations.
There is no limit to the number of analysis lines possible in the queue file.
OUTPUT FILES:
For each analysis task (i.e., row of the queue file), two output files are
generated. Both can be found in the output directory specified in the queue
file and will have the base name specified in columns 2 and 4 of the queue file.
One is a tab-delimited text file with the following format:
Column 1: Average speed
Column 2: Standard deviation of average speed
Column 3: Number of objects counted
Column 4: Number of objects considered to be moving
Column 5: Percentage of objects moving
Note: "-stats.txt" is appended to the queue file analysis task label.
The second is a MatLab datafile that simply contains a list of velocities
for the objects tracked in the analysis.
MOVIE OUTPUT:
If track_stuff_queued_movie is invoked, an AVI movie file is generated
and placed in the output directory, again with the base name specified
in the queue file. Generating output movies takes a really long time.
--------------------
VI. Syntax and Examples
Assuming that MATLAB is loaded and you have changed the "Current
Directory" to the one that contains the MATLAB scripts, it is very easy to run.
You just need to make sure that you have followed all the requirements
concerning file formats and the queue file as stated above. There are two ver-
sions that may be invoked. At the MATLAB prompt, type:
track_stuff_queued('');
- or -
track_stuff_queued_movie('');
where is the full path and filename of the queue file.
Note the single quotes (') surrounding the file name.
The second version outputs a movie which is basically the same as the input
movie but with the tracks generated by the program overlaid in multiple
colors. This option will take a very long time to run and you can't touch
the computer while it's runing or else the output movie gets corrupted. It
does make nice movies, though.
Assuming that you have moved the ExampleMovie-Indeo.avi file and
ExampleQueue.txt files to "C:\TEMP", you can invoke the following example:
track_stuff_queued('C:\TEMP\ExampleQueue.txt');
You will see some dots go across the screen as it processes each analysis line
in the queue file, and then a bunch of numbers will be output from the program.
These numbers are all saved in permenant files as specified in the queue file
(see the File Formats section above). For the example, you should see files
called:
TP00-stats.txt
TP00.m
TP10-stats.txt
TP10.m
...etc.
appearing in C:\TEMP as the program processes. You are encouraged to look at
the example queue file so that you can better understand its structure. Using
a spreadsheet program such as Excel is extremely useful for setting up queue
files. Just be sure to save as a tab-delimited text file.
If you invoke the _movie version, additional .AVI files will also appear in
C:\TEMP. Again, this will take a really long time and you should not use the
_movie version for routine use.
--------------------
VII. Notes
- It is not recommended to routinely generate track movies for every analysis
unless you don't mind locking up your computer for long periods of time.
- Unfortunately we do not have the resources to provide technical support on
the programs, but if you find it to be useful, feel free to drop us a line.
jdjaffe#fas.harvard.edu
ndarnton#rowland.harvard.edu
(convert the # to a @ - this is an effort to reduce spam)
Hackers guide:
- Most of the code is commented. Feel free to inspect it.
- To analyze light objects on a dark background, comment out (with a %)
line 33 (bw=~bw) in trackstats.m.
- To alter the minimum object size, edit value in line 35 of
trackstats.m (default is set to 9 pixels).
- To see what is going on as you run it, it is useful to put in
breakpoints and then checking the frames as they are processed. This
happens mostly in trackstats.m. You can adjust the thresholding and
size parameters by do this, and then using the imshow command as
needed. Just "step through" the program as it executes.
近期下载者:
相关文件:
收藏者: