Monday, April 18, 2011

Semaine 4 lundi

~ lundi ~

Baseline 1: Global Color Histogram, code is working. Testing on some images yields very bad prediction results, which is expected - because it's just going by color. Lots of dishes can have the same color but totally different spatial information. Global color histogram loses the spatial information, unlike local color histograms. Thus result is bad.

Lessons learned in OpenCV and debug statements specifically:
  • When access matrix elements with at<uchar>(y,x) or at<float>(y,x), make sure the type inside angle brackets <> matches the type of the matrix... My print() function assumed <uchar>, so when I tried to debug my CV_32SC1 matrix, it kept printing out 1 0 0 0 2 0 0 0 3 0 0 0... instead of 1 2 3... Took me way longer than it should to figure out that my matrix was correct, just that my debug statement is incorrect...
    • I know I've had this problem before, that was one of the things that made me waste a lot of time and dislike OpenCV. The other thing is the bad documentation - -
  • Em, when printing out using fprintf (), remember to supply it with an argument...? I was wondering why my SVM prediction results were all 0s, couldn't figure out and fell asleep. Morning, went to change all the parameters to a forum's post's values, and then found out that my printout statement was fprintf (stderr, "%f\n"); ... just forgot to supply an actual float value.
TODO:
Going to test on a larger set of images, record the results.
Then move on to EMD. Code and example is already compiling and running, but need to link it to my code and data.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home