Post date: May 08, 2012 4:52:1 AM
So I have been struggling with detecting if something is in the frame. Ultimately this turned out to be because the Mat.Get() method is returning unsigned values but Java doesn't have unsigned numbers. only signed. If this just meant that I was going -128 to +128 that would have been easy but in fact it was completely random. Black was still 0 200 is something like -52. I couldn't figure out what was wrong there. Once I got that taken care of I have a linear number that represents brightness. Yay!
So I put out the new code yesterday with a value of 100. Seemed like a good place. The White paper on the back was giving me usually > 200. So I grabbed it today and had >21k images captured. All I could think was that I had used a > instead of a <. Apparently the threshold was correct because I didn't have any pictures with a cat across the detection pixel.
So I jumped in to look and lo and behold it's <. I don't get it. All I can think is that I pushed it from a broken version of eclipse. It must have messed with something. I changed it to <= and it seemed to work fine. So I changed it back to < and it again worked fine. It's back out there now with the version newly compiled on a fresh eclipse install.