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: docs/modules/prepro.rst
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -215,6 +215,14 @@ preserve the content in an image. The following figure illustrates these two ben
215
215
:width:100 %
216
216
:align:center
217
217
218
+
The major reason for combined affine transformation being fast is because it has lower computational complexity.
219
+
Assume we have ``k`` affine transformations ``T1, ..., Tk``, where ``Ti`` can be represented by 3x3 matrixes.
220
+
The sequential transformation can be represented as ``y = Tk (... T1(x))``,
221
+
and the time complexity is ``O(k N)`` where ``N`` is the cost of applying one transformation to image ``x``.
222
+
``N`` is linear to the size of ``x``.
223
+
For the combined transformation ``y = (Tk ... T1) (x)``
224
+
the time complexity is ``O(27(k - 1) + N) = max{O(27k), O(N)} = O(N)`` (assuming 27k << N) where 27 = 3^3 is the cost for combine two transformations.
225
+
218
226
219
227
Get rotation matrix
220
228
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -261,17 +269,13 @@ Apply keypoint transform
261
269
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
262
270
.. autofunction:: affine_transform_keypoints
263
271
264
-
Projective transform by points
265
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
266
-
.. autofunction:: projective_transform_by_points
267
-
268
272
269
273
Images
270
274
-----------
271
275
272
-
- These functions only apply on a single image, use ``threading_data`` to apply multiple threading see ``tutorial_image_preprocess.py``.
273
-
- All functions have argument ``is_random``.
274
-
- All functions end with ``*_multi`` process all images together, usually be used for image segmentation i.e. the input and output image should be matched.
0 commit comments