[opencv] 13/89: Add images for tutorials on morphological operations to avoid possible confusion.

Nobuhiro Iwamatsu iwamatsu at moszumanska.debian.org
Sat May 13 09:57:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

iwamatsu pushed a commit to annotated tag 2.4.13.2
in repository opencv.

commit c419552002486ef45ba403afc6eeb145fc081275
Author: catree <catree.catreus at outlook.com>
Date:   Mon Oct 17 00:01:08 2016 +0200

    Add images for tutorials on morphological operations to avoid possible confusion.
---
 .../imgproc/erosion_dilatation/erosion_dilatation.rst    |  15 +++++++++++++++
 .../images/Morphology_1_Tutorial_Theory_Dilatation_2.png | Bin 0 -> 1558 bytes
 .../images/Morphology_1_Tutorial_Theory_Erosion_2.png    | Bin 0 -> 1533 bytes
 .../images/Morphology_2_Tutorial_Theory_Closing_2.png    | Bin 0 -> 1383 bytes
 .../images/Morphology_2_Tutorial_Theory_Opening_2.png    | Bin 0 -> 1341 bytes
 .../opening_closing_hats/opening_closing_hats.rst        |  13 ++++++++++++-
 6 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.rst b/doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.rst
index 5ba21f6..4d7eedb 100644
--- a/doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.rst
+++ b/doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.rst
@@ -53,6 +53,14 @@ Dilation
 
 The background (bright) dilates around the black regions of the letter.
 
+To better grasp the idea and avoid possible confusion, in this another example we have inverted the original image such as the object in white is now the letter. We have performed two dilatations with a rectangular structuring element of size :math:`3x3`.
+
+  .. image:: images/Morphology_1_Tutorial_Theory_Dilatation_2.png
+     :alt: Left image: original image inverted, right image: resulting dilatation
+     :align: center
+
+The dilatation makes the object in white bigger.
+
 Erosion
 ^^^^^^^^
 
@@ -66,6 +74,13 @@ Erosion
      :alt: Erosion result - Theory example
      :align: center
 
+In the same manner, the corresponding image resulting of the erosion operation on the inverted original image (two erosions with a rectangular structuring element of size :math:`3x3`.
+
+  .. image:: images/Morphology_1_Tutorial_Theory_Erosion_2.png
+     :alt: Left image: original image inverted, right image: resulting erosion
+     :align: center
+
+The erosion makes the object in white smaller.
 
 Code
 ======
diff --git a/doc/tutorials/imgproc/erosion_dilatation/images/Morphology_1_Tutorial_Theory_Dilatation_2.png b/doc/tutorials/imgproc/erosion_dilatation/images/Morphology_1_Tutorial_Theory_Dilatation_2.png
new file mode 100644
index 0000000..bdca7c6
Binary files /dev/null and b/doc/tutorials/imgproc/erosion_dilatation/images/Morphology_1_Tutorial_Theory_Dilatation_2.png differ
diff --git a/doc/tutorials/imgproc/erosion_dilatation/images/Morphology_1_Tutorial_Theory_Erosion_2.png b/doc/tutorials/imgproc/erosion_dilatation/images/Morphology_1_Tutorial_Theory_Erosion_2.png
new file mode 100644
index 0000000..5e666ee
Binary files /dev/null and b/doc/tutorials/imgproc/erosion_dilatation/images/Morphology_1_Tutorial_Theory_Erosion_2.png differ
diff --git a/doc/tutorials/imgproc/opening_closing_hats/images/Morphology_2_Tutorial_Theory_Closing_2.png b/doc/tutorials/imgproc/opening_closing_hats/images/Morphology_2_Tutorial_Theory_Closing_2.png
new file mode 100644
index 0000000..57b7905
Binary files /dev/null and b/doc/tutorials/imgproc/opening_closing_hats/images/Morphology_2_Tutorial_Theory_Closing_2.png differ
diff --git a/doc/tutorials/imgproc/opening_closing_hats/images/Morphology_2_Tutorial_Theory_Opening_2.png b/doc/tutorials/imgproc/opening_closing_hats/images/Morphology_2_Tutorial_Theory_Opening_2.png
new file mode 100644
index 0000000..973e13a
Binary files /dev/null and b/doc/tutorials/imgproc/opening_closing_hats/images/Morphology_2_Tutorial_Theory_Opening_2.png differ
diff --git a/doc/tutorials/imgproc/opening_closing_hats/opening_closing_hats.rst b/doc/tutorials/imgproc/opening_closing_hats/opening_closing_hats.rst
index abe7b49..a09ea41 100644
--- a/doc/tutorials/imgproc/opening_closing_hats/opening_closing_hats.rst
+++ b/doc/tutorials/imgproc/opening_closing_hats/opening_closing_hats.rst
@@ -31,7 +31,7 @@ In the previous tutorial we covered two basic Morphology operations:
    * Erosion
    * Dilation.
 
-Based on these two we can effectuate more sophisticated transformations to our images. Here we discuss briefly 05 operations offered by OpenCV:
+Based on these two we can effectuate more sophisticated transformations to our images. Here we discuss briefly 5 operations offered by OpenCV:
 
 Opening
 ---------
@@ -50,6 +50,12 @@ Opening
      :alt: Opening
      :align: center
 
+For the sake of clarity, we have performed the opening operation (:math:`7x7` rectangular structuring element) on the same original image but inverted such as the object in white is now the letter.
+
+  .. image:: images/Morphology_2_Tutorial_Theory_Opening_2.png
+     :alt: Left image: original image inverted, right image: resulting opening
+     :align: center
+
 Closing
 ---------
 
@@ -65,6 +71,11 @@ Closing
      :alt: Closing example
      :align: center
 
+On the inverted image, we have performed the closing operation (:math:`7x7` rectangular structuring element):
+
+  .. image:: images/Morphology_2_Tutorial_Theory_Closing_2.png
+     :alt: Left image: original image inverted, right image: resulting closing
+     :align: center
 
 Morphological Gradient
 ------------------------

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list