Skip to content

vectorization #9

@qiminchen

Description

@qiminchen

Hi, thanks for the amazing work. Do you know how to vectorize the code for computing normal from depth, it is pretty slow using for loop. I tried to vectorize it but didn't work it out.

h, w = Z.shape[:2]
normal = np.zeros((h-win_sz, w-win_sz, 3))
for i in range(h-win_sz):
for j in range(w-win_sz):
norm_val = cal_patch(i, j, win_sz)
normal[i, j] = norm_val

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions