VLFeat open source library does not return structure Fq consisting of ellipsoids descriptors and gives error message ??? Attempt to reference field of non-structure array.

5 ビュー (過去 30 日間)
I am working on an image retrieval project. It requires The VLFeat open source library which implements popular computer vision algorithms specializing in image understanding and local features extraction and matching. Even after successful implementation of VLFEAT toolbox I get the following error:
??? Attempt to reference field of non-structure array.
Error in ==> gm at 84 locs = fq.f(1:2,:);
fq is a struct with the N query features as returned by VLFEAT: contains of two elements: 1.- fq.f is a 6xN matrix with the ellipsoids descriptors of each detected feature in the query. 2.- fq.d is a MxN matrix with the M-dimensional features descriptors of each detected feature in the query.

採用された回答

Dima Lisin
Dima Lisin 2015 年 4 月 8 日
It looks like fq is not a struct. Put a breakpoint at that line, and see what it is. My guess is that it may be empty.
  3 件のコメント
Sushant Hiwale
Sushant Hiwale 2015 年 4 月 10 日
編集済み: Sushant Hiwale 2015 年 4 月 10 日
I created a structure Fq as follows:
------------------------------------------------------------
im1 = imread('data/oxbuild_lite/all_souls_000002.jpg') ;
[frames1, descrs1] = getFeatures(im1, 'peakThreshold', 0.001) ;
fq = struct('f', {frames1}, 'd', {descrs1})
a=fq.f;
b=fq.d;
-------------------------------------------------------------------------
GETFEATURES Extract feature frames (keypoints) and descriptors.
fq.f: [4x2048 single]
fq.d: [128x2048 single]
and gave it as input to the function 'gm' as an input parameter still the error remains the same.
??? Attempt to reference field of non-structure array.
Error in ==> gm at 84
locs = fq.f(1:2,:);
Sushant Hiwale
Sushant Hiwale 2015 年 4 月 10 日
function [frames, descrs] = getFeatures(im, varargin)
opts.method = 'hessian' ;
opts.affineAdaptation = false ;
opts.orientation = true ;
opts.peakThreshold = 28 / 256^2 ;
opts = vl_argparse(opts, varargin) ;
if size(im,3) > 1, im = rgb2gray(im) ;
end im = im2single(im) ;
[frames, descrs] = vl_covdet(im, ... 'AffineAdaptation', opts.affineAdaptation, ... 'Orientation', opts.orientation, ... 'FirstOctave', 0, ... 'FloatDescriptors', ... 'Method', opts.method, ... 'PeakThreshold', opts.peakThreshold, ... 'Verbose') ;
frames = single(frames) ;

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by