Open wjgarnett opened 7 years ago
num_neighbors is just the radius of a sliding window.
Usually, according to Imagescale value, a sliding window is a rectangle window, which may be 5*5
, 3*3
, etc.
thx, but what i mean is num_neighbors = Imagescale/2 may be reasonable.
If num_neighbors = Imagescale/2 is work correctly.
When Imagescale = 2, num_neighbors = 1, and the sliding window may be smaller than 3*3
which may not work.
In my code num_neighbors = (Imagescale*Imagescale+1)/2 = 2
and the sliding window is 5*5
.
Any way, u can try it out by using num_neighbors = Imagescale/2, and check your idea.
num_neighbors may caculate by following: num_neighbors = Imagescale/2 ??
the reason is the down-sample size is Imagescale, a pixel (x,y) in down-sample scale is correspond with about a rectangle whose size is (Imagescale, Imagescale)