(h, w, pixel_aspect_ratio=1.0, align_corners=False, dtype=None, device=None)
| 58 | |
| 59 | |
| 60 | def make_axial_pos(h, w, pixel_aspect_ratio=1.0, align_corners=False, dtype=None, device=None): |
| 61 | y_min, y_max, x_min, x_max = bounding_box(h, w, pixel_aspect_ratio) |
| 62 | if align_corners: |
| 63 | h_pos = torch.linspace(y_min, y_max, h, dtype=dtype, device=device) |
| 64 | w_pos = torch.linspace(x_min, x_max, w, dtype=dtype, device=device) |
| 65 | else: |
| 66 | h_pos = centers(y_min, y_max, h, dtype=dtype, device=device) |
| 67 | w_pos = centers(x_min, x_max, w, dtype=dtype, device=device) |
| 68 | return make_grid(h_pos, w_pos) |
| 69 | |
| 70 | |
| 71 | def freqs_pixel(max_freq=10.0): |
no test coverage detected