define function using new_x,new_y which is an expr of x,y #8809
Unanswered
HuaMuLanChina
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
x, y = hl.Var("x"), hl.Var("y")
new_x = expr_of_xy_0...
new_y = expr_of_xy_1...
dst_img = hl.Func("dst_img")
dst_img[x,y] = hl.select(cond,expr_of_new_x_and_new_y,bg_color)
-------------------is this possible?--------------------------------------------------------_
bool_mapping_flag= hl.Func("bool_mapping_flag")
bool_mapping_flag[newx,newy] = hl.select(cond,True,False)
expr_of_xy0,expr_of_xy1 are some of kind of transformation(rotation or scale) on xy grid.
x,y and new_x,new_y is images with same width height.
use newx,newy for bool_mapping_flag got error like:
Error: Argument 1 in initial definition of "bool_mapping_flag" is not a Var.
Beta Was this translation helpful? Give feedback.
All reactions