kukuruza / City-Project

Analyze traffic given a set of optical cameras in urban areas
0 stars 0 forks source link

geometry generateProbMatrix returns bad things in special cases #10

Closed kukuruza closed 10 years ago

kukuruza commented 10 years ago

as @Lotuslisa explained

1) if cars1 == [], then geometry.generateProbMatrix returns NaN, though the expected result is []

cars1 = []; cars2 = Car([0 0 1 1]); geometry.generateProbMatrix(cars1, cars2) == NaN

2) if timestamps are the same in both frames, then geometry.generateProbMatrix returns a matrix with NaN, but it's better if it returns a matrix of zeros

cars1 = Car([0 0 1 1]); cars2 = car1; geometry.generateProbMatrix(cars1, cars2) == NaN

satwikkottur commented 10 years ago

Made necessary changes, let me know if it works as expected now. Thanks.

kukuruza commented 10 years ago

MetricsLearnerTest doesn't return any errors. So I guess, it's all good

kukuruza commented 10 years ago

Hey, I changed some code, because it turns out that generateProbMatrix needs to return 0 x N or N x 0 depending on which frame is empty