You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed earlier that calculating the pyramid with the same parameters on the same image returns a different number of scales when using this library and when using the original matlab code. After some debugging I found that d0 and d1 are apparently the opposite of what they are in the original code:
My image is 500px in width and 375px in height, the original code is if(sz(1)<sz(2)), d0=sz(1); d1=sz(2); else d0=sz(2); d1=sz(1); end with sz = [375 500] which results in d0 = 375; d1 = 500 (or in general: d0 is the smaller dimension and d1 the larger).
Which results in the d0/d1 swapping only happening when d0 is already the smaller value. In my case d0 = 500 and d1 = 375.
This resulted in 34 instead of 33 scales. Simply changing that if in a way that d0 is always the smaller value fixed the issue (either by changing the initialization or by using >=).
The text was updated successfully, but these errors were encountered:
I noticed earlier that calculating the pyramid with the same parameters on the same image returns a different number of scales when using this library and when using the original matlab code. After some debugging I found that
d0
andd1
are apparently the opposite of what they are in the original code:My image is 500px in width and 375px in height, the original code is
if(sz(1)<sz(2)), d0=sz(1); d1=sz(2); else d0=sz(2); d1=sz(1); end
withsz = [375 500]
which results ind0 = 375; d1 = 500
(or in general:d0
is the smaller dimension andd1
the larger).However the code here is:
Which results in the
d0
/d1
swapping only happening whend0
is already the smaller value. In my cased0 = 500
andd1 = 375
.This resulted in 34 instead of 33 scales. Simply changing that
if
in a way thatd0
is always the smaller value fixed the issue (either by changing the initialization or by using>=
).The text was updated successfully, but these errors were encountered: