autopano-sift-c segfault if RANSAC is not used and align is requested

46 views
Skip to first unread message

Ugo Riboni

unread,
Jun 28, 2009, 9:29:05 AM6/28/09
to hugin and other free panoramic software
Hi all,
I'm using autopano-sift-c, latest source from repository trunk.

If i pass a command line not using RANSAC (the default) and using --
align, the program crashes.
A sample cmd line is the following:

$ autopano-sift-c --projection 0,48.972651 --maxmatches 10 --align --
generate-horizon 3 /tmp/ap_reszlE8kq "/pics/pict0384.jpg" "/pics/
pict0385.jpg"

I debugged a bit and it seems the issue is in BondBall.c at line 99:

double centerDegree = (fit->trans->centerAngle / (2.0 * M_PI)) *
360.0;

It seems that "fit" is NULL, which lead to a segfault. The problem
seem to be that fit is NULL because it's assigned from the
"bestMatchFirst" member the linked list items, and this member is only
set when RANSAC is active. See MatchKeys.c line 335 and the if
condition it is in.

I don't even pretend to understand what that code does, so I can't
offer a patch.
I just enable RANSAC and everything works again.

However it seems like a bug to me. Either enable RANSAC by default
when --align is selected or just quit and say that --align require
RANSAC to be enabled to work.

Below is the full log of the error (purged of license notices) in case
anyone is interested:

APSCpp, enhanced Autopano-sift-c
Stereographic projection enabled.
Filename /pics/pict0384.jpg
width 2272 height 1704 format 0 hfov 48.9727
reduce size to 1600 x 1200
use stereographic projection
7987 keypoints found

Filename /pics/pict0385.jpg
width 2272 height 1704 format 0 hfov 48.9727
reduce size to 1600 x 1200
use stereographic projection
7584 keypoints found

15.3 seconds to find keypoints

Matching; ransac off, ANNmatch on...
ANN kd-tree: 15571 keypoints, cutoff depth 251
100.00%, 15571/15571
Global match search yielded 299 matches
Created 1 match partitions, max l = 1

Filtering... (/pics/pict0384.jpg, /pics/pict0385.jpg)
A. Join Filtration: 271 to 271
B. Score Filtration: 271 to 10
Filtered partition [0,1] from 271 matches down to 10

1.9 seconds to match keypoints

Connected component check...
Connected component identification resulted in 1 component:
component 1: /pict0384.jpg, /pict0385.jpg

Searching for matches between /pics/pict0384.jpg-/pics/pict0385.jpg
found!
Building bondball
Segmentation fault


Cheers
--
Ugo
Reply all
Reply to author
Forward
0 new messages