trishume / SmartGaze

WIP Open source IR eye tracker for the Eye Tribe tracker hardware
GNU General Public License v2.0
28 stars 13 forks source link

problem with image dimensions #3

Open christianPetrucci opened 8 years ago

christianPetrucci commented 8 years ago

hi, i'm studing your code and if i use an image with different dimension (part of original image) i have problem Output buffer f2 is accessed at -11, which is before the min (0) in dimension 0 what is the problem? i think that is a problem of halide. it is possible to solve it?

trishume commented 8 years ago

I'm not quite sure what you are talking about, especially since f2 does not occur anywhere in the source.

My main guess is that runFunc in halideFuncs.cpp does not handle cv::Mats which have a different stride because they are a subsection of a larger matrix. I think there is some way of setting the stride properly, possibly with the two parameters that are currently 0 constants in that function. To fix it you can either look at the Halide docs and figure out strides, or just copy the matrix before passing it to runFunc.