(mesh, cc, x_anchor, y_anchor, source_type)
| 909 | return omap, revise_flag |
| 910 | |
| 911 | def repaint_info(mesh, cc, x_anchor, y_anchor, source_type): |
| 912 | if source_type == 'rgb': |
| 913 | feat = np.zeros((3, x_anchor[1] - x_anchor[0], y_anchor[1] - y_anchor[0])) |
| 914 | else: |
| 915 | feat = np.zeros((1, x_anchor[1] - x_anchor[0], y_anchor[1] - y_anchor[0])) |
| 916 | for node in cc: |
| 917 | if source_type == 'rgb': |
| 918 | feat[:, node[0] - x_anchor[0], node[1] - y_anchor[0]] = np.array(mesh.nodes[node]['color']) / 255. |
| 919 | elif source_type == 'd': |
| 920 | feat[:, node[0] - x_anchor[0], node[1] - y_anchor[0]] = abs(node[2]) |
| 921 | |
| 922 | return feat |
| 923 | |
| 924 | def get_context_from_nodes(mesh, cc, H, W, source_type=''): |
| 925 | if 'rgb' in source_type or 'color' in source_type: |
nothing calls this directly
no outgoing calls
no test coverage detected