(self, frame: StereoData, numPoint: int, depth0_est: IStereoDepth.Output, depth1_est: IStereoDepth.Output, match_est: IMatcher.Output | None)
| 105 | Uniformly random select keypoints within the scope of [mask_width : -mask_width] |
| 106 | """ |
| 107 | def select_point(self, frame: StereoData, numPoint: int, depth0_est: IStereoDepth.Output, depth1_est: IStereoDepth.Output, match_est: IMatcher.Output | None) -> torch.Tensor: |
| 108 | h_indices = torch.randint(self.config.mask_width, frame.height - self.config.mask_width, (numPoint, 1), device=self.config.device) |
| 109 | w_indices = torch.randint(self.config.mask_width, frame.width - self.config.mask_width, (numPoint, 1), device=self.config.device) |
| 110 | kps = torch.cat([w_indices, h_indices], dim=1) |
| 111 | return kps |
| 112 | |
| 113 | @classmethod |
| 114 | def is_valid_config(cls, config: SimpleNamespace | None) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected