problems about viper-pe point distance

107 views
Skip to first unread message

avastreg

unread,
Feb 29, 2008, 7:13:19 AM2/29/08
to ViPER Mailing List
Hi, i'm new with ViPER-PE and i'm working on it for my graduating
thesis. That's a very good work, but i've got some problems on point
type evaluation.

I get a NullPointerException at
viper.descriptors.attributes.Attribute_point
$EuclideanDistance.helpGetDistance(Unknown Source)
at viper.comparison.distances.Distances.. etc
and then the exception chain until to main.

Here there are my test file:

target GT:

<object framespan="77:94" id="0" name="Person">
<attribute name="PositionBar">
<data:point framespan="77:77" x="14" y="180"/>
<data:point framespan="78:78" x="17" y="187"/>
<data:point framespan="79:79" x="18" y="182"/>
</attribute>
</object>


candidate:

<object framespan="77:94" id="0" name="Person">
<attribute name="PositionBar">
<data:point framespan="77:77" x="12" y="176"/>
<data:point framespan="78:78" x="17" y="187"/>
<data:point framespan="79:79" x="23" y="188"/>
</attribute>
</object>

my epf file:

#BEGIN_OBJECT_EVALUATION
OBJECT Person [- -]
PositionBar : [- 0.1]
#END_OBJECT_EVALUATION

//#BEGIN_FRAMEWISE_EVALUATION
OBJECT Person
PositionBar : euclidean
//#END_FRAMEWISE_EVALUATION

i've tried the object evaluation only and i get the NullPointer.

If needed i'll post my pr file.

Is it a bug?? Have i do something wrong?

Thank you in advice for the help!


David Mihalcik

unread,
Mar 2, 2008, 12:32:16 AM3/2/08
to ViPER Mailing List
There is a bug in the distance measure for points. It isn't
'null safe', meaning it will fail instead of giving a distance if no
point is specified in either the target or candidate data on a frame.

A work around is making sure you have a value on every frame that is
in your object, but that might not be doable. (e.g. a face landmark
point disappears when a person turns their head, but the 'object' is
the person, not the landmark, so you'd still expect to have a
descriptor).

I'd recommend filing a bug with viper-bugs, or you can fix it yourself
if you download the source code. The bug is in the method on the top
of your stack trace, in the EuclideanDistance inner class of
viper.descriptors.attributes.Attribute_point. You'd have to check the
values of the Difference object for nulls, instead of doing what it
does now, which is dereference them directly.

avastreg

unread,
Mar 5, 2008, 11:52:33 AM3/5/08
to ViPER Mailing List
Thank you for your suggestion and your answer, i've fixed it in the
source code, checking values for null.

Greetings

Alessandro
Reply all
Reply to author
Forward
0 new messages