GreycLab / CImg

The CImg Library is a small and open-source C++ toolkit for image processing
http://cimg.eu
Other
1.46k stars 278 forks source link

【Algorithm】How should I make an Image sequence by order of Z? #382

Open rookieWanZ opened 1 year ago

rookieWanZ commented 1 year ago

I run the code 8.4 LucasKanade1

At the 35th line, access the cimglist grad(2), and this grad(2) is all zero( the 0 and 1 part has normal value)

How should I pass the Image sequence by order of Z?

image

image

rookieWanZ commented 1 year ago

Why is the slice0 same as slice1? image

CImg<float> ImgSeq(IMG_WIDTH,IMG_HEIGHT,2,1,0); ImgSeq.slice(0).rand(0,255); ImgSeq.slice(1).rand(100,200); auto Sub = ImgSeq.slice(0) - ImgSeq.slice(1); float va,vb; va = Sub.max_min(vb); printf("%f %f\r\n",va,vb);// 0 0 ???????