MCPcopy Create free account
hub / github.com/MAC-VO/MAC-VO / select_point

Method select_point

Module/KeypointSelector.py:28–48  ·  view source on GitHub ↗

Select keypoint for tracking using given frame, (optionally) estimated depth, depth_cov, and flow_cov. Return keypoint as a FloatTensor with shape (N, 2) where keypoints are arranged in (u, v) format. ## NOTE this means that you need to out

(
        self,
        frame   : StereoData,
        numPoint: int,
        depth0_est: IStereoDepth.Output,
        depth1_est: IStereoDepth.Output,
        match_est: IMatcher.Output | None,
    )

Source from the content-addressed store, hash-verified

26
27 @abstractmethod
28 def select_point(
29 self,
30 frame : StereoData,
31 numPoint: int,
32 depth0_est: IStereoDepth.Output,
33 depth1_est: IStereoDepth.Output,
34 match_est: IMatcher.Output | None,
35 ) -> torch.Tensor:
36 """
37 Select keypoint for tracking using given frame, (optionally) estimated depth, depth_cov, and flow_cov.
38
39 Return keypoint as a FloatTensor with shape (N, 2) where keypoints are arranged in (u, v) format.
40
41 ## NOTE
42
43 this means that you need to output the index of keypoints in *different* coordinate system as pytorch.
44
45 Use `image[kp[..., 1], kp[..., 0]]` to read value of image on all u-v coords of keypoints.
46 The default output of this function is (0x2 torch.Tensor) which means no keypoints are selected.
47 """
48 return torch.zeros((0, 2), dtype=torch.long, device=self.config.device)
49
50
51class SelectorCompose(IKeypointSelector):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected