Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Effect of wa,wb,wc,wd in interpolate function ? #5

Open
Sinnaeve opened this issue May 27, 2019 · 0 comments
Open

Effect of wa,wb,wc,wd in interpolate function ? #5

Sinnaeve opened this issue May 27, 2019 · 0 comments

Comments

@Sinnaeve
Copy link

Hi,

I'm not sure to understand the use of wa, wb, wc, wd in the interpolate function:
"

use indices to lookup pixels in the flat image and restore

# channels dim
im_flat = tf.reshape(im, tf.stack([-1, channels]))
im_flat = tf.cast(im_flat, 'float32')
Ia = tf.gather(im_flat, idx_a)
Ib = tf.gather(im_flat, idx_b)
Ic = tf.gather(im_flat, idx_c)
Id = tf.gather(im_flat, idx_d)

wa = tf.expand_dims(((1-x+x0_f) * (1-y+y0_f)), 1)
wb = tf.expand_dims(((1-x+x0_f) * (1-y1_f+y)), 1)
wc = tf.expand_dims(((1-x1_f+x) * (1-y+y0_f)), 1)
wd = tf.expand_dims(((1-x1_f+x) * (1-y1_f+y)), 1)

output = tf.add_n([waIa, wbIb, wcIc, wdId])
"

Do you use the w as a weight which value depends on how far the sample pixel is from the true floating interpolated localization (x,y) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant