You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: norfair/common_reference_ui.py
+58-28Lines changed: 58 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ def set_reference(
45
45
reference: str,
46
46
footage: str,
47
47
transformation_getter: TransformationGetter=None,
48
-
mask_generator=None,
48
+
mask_generator=None,
49
49
desired_size=700,
50
50
motion_estimator=None,
51
51
):
@@ -58,11 +58,11 @@ def set_reference(
58
58
To add a point, just click a pair of points (one from the footage window, and another from the reference window) and select "Add"
59
59
To remove a point, just select the corresponding point at the bottom left corner, and select "Remove".
60
60
61
-
If either footage or reference are videos, you can jump to future frames to pick points that match.
61
+
If either footage or reference are videos, you can jump to future frames to pick points that match.
62
62
For example, to jump 215 frames in the footage, just write an integer number of frames to jump next to 'Frames to skip (footage)', and select "Skip frames".
63
63
A motion estimator can be used to relate the coordinates of the current frame you see (in either footage or reference) to coordinates in its corresponding first frame.
64
64
65
-
Once a transformation has been estimated, you can test it:
65
+
Once a transformation has been estimated, you can test it:
66
66
To Test your transformation, Select the 'Test' mode, and pick a point in either the reference or the footage, and see the associated point in the other window.
67
67
You can keep adding more associated points until you are satisfied with the estimated transformation
TransformationGetter defining the type of transformation you want to fix between reference and footage.
78
-
Since the transformation can be really far from identity (given that the perspectives in footage and reference can be immensely different),
77
+
TransformationGetter defining the type of transformation you want to fix between reference and footage.
78
+
Since the transformation can be really far from identity (given that the perspectives in footage and reference can be immensely different),
79
79
and also knowing that outliers shouldn't be common given that a human is picking the points, it is recommended to use a high ransac_reproj_threshold (~ 1000)
80
80
81
-
- mask_generator: optional function that creates a mask (np.ndarray) from a PIL image. This mask is then provided to the corresponding MotionEstimator to avoid
81
+
- mask_generator: optional function that creates a mask (np.ndarray) from a PIL image. This mask is then provided to the corresponding MotionEstimator to avoid
82
82
sampling points within the mask.
83
83
84
84
- desired_size: int, optional
85
85
How large you want the clickable windows in the UI to be.
86
-
86
+
87
87
- motion_estimator: MotionEstimator, optional
88
88
When using videos for either the footage or the reference, you can provide a MotionEstimator to relate the coordinates in all the frames in the video.
89
89
The motion estimator is only useful if the camera in either the video of the footage or the video of the reference can move. Otherwise, avoid using it.
0 commit comments