Skip to content

Commit 5f2f251

Browse files
committed
doco update
1 parent cd25f59 commit 5f2f251

File tree

6 files changed

+51
-24
lines changed

6 files changed

+51
-24
lines changed

machinevisiontoolbox/ImageCore.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ def umax(self):
648648
>>> from machinevisiontoolbox import Image
649649
>>> img = Image.Read('flowers1.png')
650650
>>> img.umax
651+
>>> img.width
651652
652653
:seealso: :meth:`width`
653654
"""
@@ -668,6 +669,7 @@ def vmax(self):
668669
>>> from machinevisiontoolbox import Image
669670
>>> img = Image.Read('flowers1.png')
670671
>>> img.vmax
672+
>>> img.height
671673
672674
:seealso: :meth:`height`
673675
"""
@@ -1676,9 +1678,16 @@ def red(self):
16761678
>>> from machinevisiontoolbox import Image
16771679
>>> img = Image.Read("flowers4.png")
16781680
>>> red = img.red() # red plane
1681+
>>> red.disp()
16791682
>>> red
16801683
>>> red.iscolor
16811684
1685+
.. plot::
1686+
1687+
from machinevisiontoolbox import Image
1688+
Image.Read("flowers4.png").red().disp()
1689+
1690+
16821691
:seealso: :meth:`plane` :meth:`green` :meth:`blue`
16831692
"""
16841693
return self.plane("R")
@@ -1698,9 +1707,15 @@ def green(self):
16981707
>>> from machinevisiontoolbox import Image
16991708
>>> img = Image.Read("flowers4.png")
17001709
>>> green = img.green() # green plane
1710+
>>> green.disp()
17011711
>>> green
17021712
>>> green.iscolor
17031713
1714+
.. plot::
1715+
1716+
from machinevisiontoolbox import Image
1717+
Image.Read("flowers4.png").green().disp()
1718+
17041719
:seealso: :meth:`plane` :meth:`red` :meth:`blue`
17051720
"""
17061721
return self.plane("G")
@@ -1720,9 +1735,15 @@ def blue(self):
17201735
>>> from machinevisiontoolbox import Image
17211736
>>> img = Image.Read("flowers4.png")
17221737
>>> blue = img.blue() # blue plane
1738+
>>> blue.disp()
17231739
>>> blue
17241740
>>> blue.iscolor
17251741
1742+
.. plot::
1743+
1744+
from machinevisiontoolbox import Image
1745+
Image.Read("flowers4.png").blue().disp()
1746+
17261747
:seealso: :meth:`plane` :meth:`red` :meth:`green`
17271748
"""
17281749
return self.plane("B")

machinevisiontoolbox/ImageIO.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def Read(cls, filename, alpha=False, rgb=True, **kwargs):
6767
6868
:note: If the path is not absolute it is first searched for relative
6969
to the current directory, and if not found, it is searched for in
70-
the ``images`` folder of the ``mvtb_data`` package.
70+
the ``images`` folder of the ```mvtb_data`` package <https://github.com/petercorke/machinevision-toolbox-python/tree/master/mvtb-data>`_.
7171
7272
:seealso: :func:`~machinevisiontoolbox.base.imageio.iread` :func:`~machinevisiontoolbox.base.imageio.convert` `cv2.imread <https://docs.opencv.org/master/d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56>`_
7373
"""

machinevisiontoolbox/ImageProcessing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ def stretch(self, max=1, range=None, clip=True):
281281
282282
:references:
283283
284-
- Robotics, Vision & Control, Section 12.1, P. Corke,
285-
Springer 2011.
284+
- Robotics, Vision & Control for Python, Section 12.1, P. Corke,
285+
Springer 2023.
286286
"""
287287

288288
# TODO make all infinity values = None?

machinevisiontoolbox/ImageReshape.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,10 @@ def decimate(self, m=2, sigma=None):
503503
:note:
504504
505505
- If the image has multiple planes, each plane is decimated.
506-
- Smoothing is used to eliminate aliasing artifacts and the
507-
standard deviation should be chosen as a function of the maximum
508-
spatial frequency in the image.
506+
- Smoothing is applied to the image _before_ decimation to reduce
507+
high-spatial-frequency components and reduce eliminate aliasing
508+
artifacts. The standard deviation should be chosen as a function
509+
of the maximum spatial-frequency in the image.
509510
510511
Example:
511512

machinevisiontoolbox/VisualServo.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,8 @@ def __init__(self, camera, eterm=0, lmbda=0.05, **kwargs):
501501
pbself.plot_p
502502
503503
References::
504-
- Robotics, Vision & Control, Chap 15
505-
P. Corke, Springer 2011.
504+
- Robotics, Vision & Control for Python, Chap 15
505+
P. Corke, Springer 2023.
506506
507507
.. note:: The history attribute is a vector of structures each of which is a snapshot at
508508
each simulation step of information about the image plane, camera pose, error,
@@ -621,8 +621,8 @@ def __init__(
621621
elements are the depth for the corresponding world points.
622622
623623
References::
624-
- Robotics, Vision & Control, Chap 15
625-
P. Corke, Springer 2011.
624+
- Robotics, Vision & Control for Python, Chap 15
625+
P. Corke, Springer 2023.
626626
627627
.. note::
628628
- The history property is a vector of structures each of which is a
@@ -887,8 +887,8 @@ def __init__(self, camera, eterm=0.01, plane=None, lmbda=0.08, **kwargs):
887887
The plane applies to all lines.
888888
889889
References::
890-
- Robotics, Vision & Control, Chap 15
891-
P. Corke, Springer 2011.
890+
- Robotics, Vision & Control for Python, Chap 15
891+
P. Corke, Springer 2023.
892892
893893
.. note::
894894
- The history property is a vector of structures each of which is a
@@ -1113,8 +1113,8 @@ def __init__(self, camera, eterm=0.08, plane=None, lmbda=0.04, **kwargs):
11131113
The plane applies to all lines.
11141114
11151115
References::
1116-
- Robotics, Vision & Control, Chap 15
1117-
P. Corke, Springer 2011.
1116+
- Robotics, Vision & Control for Python, Chap 15
1117+
P. Corke, Springer 2023.
11181118
11191119
.. note::
11201120
- The history property is a vector of structures each of which is a
@@ -1294,8 +1294,8 @@ def __init__(self, camera, eterm=0.001, lmbda=0.1, depth=None, **kwargs):
12941294
The plane applies to all lines.
12951295
12961296
References::
1297-
- Robotics, Vision & Control, Chap 15
1298-
P. Corke, Springer 2011.
1297+
- Robotics, Vision & Control for Python, Chap 15
1298+
P. Corke, Springer 2023.
12991299
13001300
.. note::
13011301
- The history property is a vector of structures each of which is a
@@ -1530,8 +1530,8 @@ def __init__(self, camera, eterm=0.01, lmbda=0.02, depth=None, **kwargs):
15301530
The plane applies to all lines.
15311531
15321532
References::
1533-
- Robotics, Vision & Control, Chap 15
1534-
P. Corke, Springer 2011.
1533+
- Robotics, Vision & Control for Python, Chap 15
1534+
P. Corke, Springer 2023.
15351535
15361536
.. note::
15371537
- The history property is a vector of structures each of which is a

machinevisiontoolbox/base/imageio.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -670,16 +670,21 @@ def iread(filename, *args, **kwargs):
670670
a 2D or 3D NumPy ndarray
671671
672672
Loads an image from a file or URL, and returns the
673-
image as a NumPy array, as well as the absolute path name. The
674-
image can by greyscale or color in any of the wide range of formats
675-
supported by the OpenCV ``imread`` function.
673+
image as a NumPy array, as well as the absolute path name.
676674
675+
If the path is not absolute it is first searched for relative
676+
to the current directory, and if not found, it is searched for in
677+
the ``images`` folder of the
678+
```mvtb_data`` package <https://github.com/petercorke/machinevision-toolbox-python/tree/master/mvtb-data>`_.
679+
677680
If ``file`` is a list or contains a wildcard, the result will be a list of
678681
``(image, path)`` tuples. They will be sorted by path.
679682
680-
Extra options can be passsed to perform datatype conversion, color to
681-
grey scale conversion, gamma correction, image decimation or region of
682-
interest windowing. Details are given at :func:`convert`.
683+
The image can by greyscale or color in any of the wide range of formats
684+
supported by the OpenCV ``imread`` function. Extra options can be passsed to
685+
perform datatype conversion, color to grey scale conversion, gamma
686+
correction, image decimation or region of interest windowing. Details are
687+
given at :func:`convert`.
683688
684689
Example:
685690

0 commit comments

Comments
 (0)