Sunday, December 30, 2007

Fixed an error in SIFT code

When compiling SIFT code in MATLAB using sift_compile, I got error message:


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Trying LAPACK lib 'C:\Program
Files\MATLAB\R2007a\extern\lib\win32\microsoft\libmwlapack.lib'
Writing library for siftrefinemx.mexw32
c:\users\mike\appdata\local\temp\mex_a97b690e-eec3-47be-bfb2-13aa33a93822\s
iftrefinemx.obj
.text: undefined reference to '_dgesv'

C:\PROGRA~1\MATLAB\R2007A\BIN\MEX.PL: Error: Link of
'siftrefinemx.mexw32' failed.

??? Error using ==> mex at 206
Unable to complete successfully.

Error in ==> sift_compile at 56
mex('siftrefinemx.c',opts{:}) ;

~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm using Visual Studio 7 and MATLAB 7

The problem can be solved by adding

__declspec(dllimport) ahead of the function declaration of dgesv:

#ifdef __cplusplus__
extern "C" {
__declspec(dllimport) extern int DGESV(int *n, int *nrhs, double *a, int *lda,
int *ipiv, double *b, int *ldb, int *info) ;
}
#else
__declspec(dllimport) extern int DGESV(int *n, int *nrhs, double *a, int *lda,
int *ipiv, double *b, int *ldb, int *info) ;




Saturday, December 29, 2007

MATLAB: Debugging C Language MEX-Files

http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_external/f32489.html&http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=debug+MATLAB+mex+C&btnG=Google+Search

Simple way to doubleSize or shrink an Image by half

Excerpt from Andrea Vedaldi's code:

function J = doubleSize(I)
[M,N]=size(I) ;
J = zeros(2*M,2*N) ;
J(1:2:end,1:2:end) = I ;
J(2:2:end-1,2:2:end-1) = ...
0.25*I(1:end-1,1:end-1) + ...
0.25*I(2:end,1:end-1) + ...
0.25*I(1:end-1,2:end) + ...
0.25*I(2:end,2:end) ;
J(2:2:end-1,1:2:end) = ...
0.5*I(1:end-1,:) + ...
0.5*I(2:end,:) ;
J(1:2:end,2:2:end-1) = ...
0.5*I(:,1:end-1) + ...
0.5*I(:,2:end) ;

function J = halveSize(I)
J=I(1:2:end,1:2:end) ;

Thursday, December 27, 2007

Worth Reading

Yan Ke, PCA-SIFT: A More Distinctive Representation for Local Image Descriptors.
comment: use PCA to capture and maximum distinctness of SIFT descriptors, simple but sharp.

Worth Reading

Pedro F. Felzenszwalb, Pictorial Structures for Object Recognition.
comment: introduces a tree-like pictorial structure and an efficient recursive matching algorithm based on dynamic planning.
Also a part-dependence-selection algorithm based on MST(minimum spanning tree) is proposed.
But it turns out the building of the pictorial structure is not fully automatic and the dependence-selection is not used in the experiment.

Monday, December 24, 2007

Spatial and temporal distribution of piotr's feature


A statistics shows that piotr's feature is well distributed in the video volume data.

The whole 3D space is populated with piotr's features.

I guess I don't have to worry about this quality now.

Friday, December 21, 2007

A clever way to convert monotone video to a color one

I is a monotone video with dimension [width, height, length];

V = permute(I, [1,2,4,3] );%size(V)=[width,height,1,length];
V = repmat( V, [1,1,3,1] );%size(V)=[width,height,3,length];

V is a 3-channel video (every channel is the same), though.

Thursday, December 20, 2007

Worth Reading

I decided to clean up my closet, so here comes the paper which I read a month ago:

Piotr Dollar, Behavior Recognition via Sparse Spatio-Temporal Features
comment: extend LoG to 3D video sequence, computing derivative through 2 spatial and 1 temporal dimension, find salient cubes. His toobox actually has a set of descriptors, worth playing.

Ahmed Elgammal, Inferring 3D Body Pose from Silhouettes using Activity Manifold Learning.
comment: an interesting idea. Find the manifold where continuous human motion lie and try to learn the 'inverse-projection' from this lower-dimension space to higher 3D projection.
However, there should be some fundamental problems: how to detect and solve the self-crossings?

David Beymer, Image Representations for Visual Learning.
comment: a pioneering work which learning the non-linear corresponding between 3D and 2D spaces of object model and images, which actually gives idea to Elgammal's paper.

David Heckerman, A Tutorial on Learning With Bayesian Networks
comment: as the topic says, a good tutorial on LEARNING with Bayesian Networks, not INFERRING. For inferring with Bayesian Networks, you have to look at other tutorials (Bishop, 2006, a very good book).

Michael Isard, CONDENSATION-conditional density propagation for visual tracking.
comment: A must read paper and tutorial for CONDENSATION

Dick de Ridder, Locally linear embedding for classification.
comment: A quite readable tutorial and tech-report for LLE

Sam T. Roweis, Nonlinear Dimensionality Reduction by Locally Linear Embedding.
comment: original Science paper for LLE

Joshua B. Tenenbaum, A Global Geometric Framework for Nonlinear Dimensionality Reduction.
comment: original Science paper for ISOMAP. published back to back with Sam's LLE paper.

David G. Lowe, Distinctive Image Features from Scale-Invariant Keypoints.
comment: original SIFT paper.

W.R. GILKS, Adaptive Rejection Sampling for Gibbs Sampling
comment: a clever modifcation of Gibbs sampling algorithm that bounds the sampling region adaptively to improve efficiency, quite interesting.

Weiming Hu, A Survey on Visual Surveillance of Object Motion and Behaviors.
comment: extensive survey.

Aaron F. Bobick, The Recognition of Human Movement Using Temporal Templates.
comment: original paper for Spatial-Temporal templates.

Haibin Ling, Diffusion Distance for Histogram Comparison.
comment: interesting algorithm to compare histograms using heat diffusion process simulation, which is quite reasonable.

Yossi Rubner, The Earth Mover's Distance as a Metric for Image Retrieval.
comment: EMD for histogram comparing, see Haibin Ling's paper.

Jianbo Shi, Good Feature to Track.
comment: very old tech report on Feature Detection.

Shivani Agarwal: Learning to Detect Objects in Images via a Sparse, Part-Based Representation.
comment: using bag-of-words strategy to detect objects. coocurrance and spatial information are encoded to train a SNOW classifier.

Thursday, December 13, 2007

Worth Reading

David Liu, A Topic-Motion Model for Unsupervised Video Object Discovery.
comment: An extension of paper 'Josef Sivic, Discovering objects and their location in images.' to videos.

Wednesday, December 12, 2007

Worth Reading

Shai Ben-David, A Sober Look at Clustering Stability.
comment: clever definition for the stability of clustering algorithms.

Sunday, December 09, 2007

Worth Reading

Dec. 9 th, 2007
Josef Sivic, Discovering objects and their location in images.
comment: migrating the pLSA (probabilistic latent semantic analysis) from natural language processing domain to image analysis domain. Using bag-of-words strategy to discover multiple objects automatically in a bunch of images.

Thomas Hofmann, Unsupervised Learning by Probabilistic Latent Semantic Analysis.

Thomas Hofmann, Probabilistic Latent Semantic Indexing.

Lihi Zelnik-Manor, Self-Tuning Spectral Clustering.
comment: It's about spectral clustering, with automatic parameter tuning.

Scott Deerwester, Indexing by Latent Semantic Analysis.
comment: A good tutorial for SVD application in semantic analysis and factor analysis. Providing a compact and flexible framework for associating different objects. esp. page 13-14.