SmartGaze icon indicating copy to clipboard operation
SmartGaze copied to clipboard

problem with image dimensions

Open christianPetrucci opened this issue 8 years ago • 1 comments

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?

christianPetrucci avatar Jul 04 '16 06:07 christianPetrucci

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.

trishume avatar Jul 04 '16 19:07 trishume