Digital2Slave / KopfJBU

2007_Kopf's Joint Bilateral Upsampling.
15 stars 15 forks source link

num_neighbors?? #1

Open wjgarnett opened 7 years ago

wjgarnett commented 7 years ago

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)

Digital2Slave commented 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.

wjgarnett commented 7 years ago

thx, but what i mean is num_neighbors = Imagescale/2 may be reasonable.

Digital2Slave commented 7 years ago

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.