kunzmi / ImageStackAlignator

Implementation of Google's Handheld Multi-Frame Super-Resolution algorithm (from Pixel 3 and Pixel 4 camera)
GNU General Public License v3.0
392 stars 65 forks source link

about max and min in RobustnessModell.cu #27

Open weilongMao opened 2 years ago

weilongMao commented 2 years ago

In RobustnessModell.cu line 67 to 70,

            maxShift.x = fmaxf(s.x, shiftf.x);
            maxShift.y = fmaxf(s.y, shiftf.y);
            minShift.x = fminf(s.x, shiftf.x);
            minShift.y = fminf(s.y, shiftf.y);

It seems that you are finding minimum and maximum number of s, but it doesn't. maybe the code below is your original idea

            maxShift.x = fmaxf(s.x, maxShift.x);
            maxShift.y = fmaxf(s.y, maxShift.y);
            minShift.x = fminf(s.x, minshift.x);
            minShift.y = fminf(s.y, minshift.y);
kunzmi commented 2 years ago

Yes, looks like it... Two possibilities: I had a super smart solution for a hidden problem that I don't recognize anymore and didn't explain in any comments in the code. Or it is just wrong. Currently I tend to the second option ;-)