Index: general/graphlib/opencv.xml
===================================================================
--- general/graphlib/opencv.xml	(revision 170773d3e2d82b96bd3918ae360b8f770736c811)
+++ general/graphlib/opencv.xml	(revision d4556806e4d8770ea1b3fa3c86e04532369f0eaf)
@@ -7,14 +7,16 @@
   <!ENTITY cvdir "/projects/opencvlibrary/files">
 
-  <!ENTITY opencv-download-http "&sourceforge-repo2;&cvdir;/opencv-unix/&opencv-version;/opencv-&opencv-version;.zip">
-  <!ENTITY opencv-download-ftp    " ">
-  <!ENTITY opencv-md5sum          "6082ee2124d4066581a7386972bfd52a">
-  <!ENTITY opencv-size            "76 MB">
-  <!ENTITY opencv-buildsize       "1.8 GB">
-  <!ENTITY opencv-time            "4.9 SBU">
-
-  <!ENTITY ippicv-version         "20151201">
-  <!ENTITY ippicv_binaries_commit "81a676001ca8075ada498583e4166079e5744668">
-
+  <!ENTITY opencv-download-http     "&sourceforge-repo2;&cvdir;/opencv-unix/&opencv-version;/opencv-&opencv-version;.zip">
+  <!ENTITY opencv-download-ftp      " ">
+  <!ENTITY opencv-md5sum            "6082ee2124d4066581a7386972bfd52a">
+  <!ENTITY opencv-size              "76 MB">
+  <!ENTITY opencv-buildsize         "1.8 GB">
+  <!ENTITY opencv-time              "4.9 SBU">
+
+
+  <!ENTITY ippicv-version          "20151201">
+  <!ENTITY ippicv_binaries_commit  "81a676001ca8075ada498583e4166079e5744668">
+
+  <!ENTITY opencv-contrib-download "https://github.com/opencv/opencv_contrib/archive/&opencv-version;.tar.gz">
 ]>
 
@@ -78,8 +80,25 @@
 
     <bridgehead renderas="sect3">Additional Downloads</bridgehead>
-    <para>Optional file: <ulink
-      url="https://raw.githubusercontent.com/Itseez/opencv_3rdparty/&ippicv_binaries_commit;/ippicv/ippicv_linux_&ippicv-version;.tgz">
-           https://raw.githubusercontent.com/Itseez/opencv_3rdparty/&ippicv_binaries_commit;/ippicv/ippicv_linux_&ippicv-version;.tgz</ulink>
-    </para>
+    <itemizedlist spacing="compact">
+      <listitem>
+        <para>
+          Optional file (will be downloaded when running cmake if not present):
+          <ulink
+          url="https://raw.githubusercontent.com/opencv/opencv_3rdparty/&ippicv_binaries_commit;/ippicv/ippicv_linux_&ippicv-version;.tgz"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Optional additional modules: <ulink
+          url="&opencv-contrib-download;"/>
+        </para>
+      </listitem>
+    </itemizedlist>
+
+    <note>
+      <para>Download the additional modules via wget as:</para>
+<screen><userinput>wget &opencv-contrib-download; \
+     -O opencv_contrib-&opencv-version;.tar.gz</userinput></screen>
+    </note>
 
     <bridgehead renderas="sect3">opencv Dependencies</bridgehead>
@@ -153,4 +172,10 @@
 
     <para>
+      If needed, unpack the additional modules package:
+    </para>
+
+<screen><userinput>tar xf ../opencv_contrib-&opencv-version;.tar.gz</userinput></screen>
+
+    <para>
       Install <application>opencv</application> by running the following
       commands:
@@ -190,9 +215,9 @@
     is needed for compatibiiity with gcc-6.1 and later.</para>
 
-    <para><parameter>-DWITH_IPP=ON</parameter>: This option instructs the make
-    procedure to use the downloaded IPP package.</para>
+    <para><option>-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-&opencv-version;/modules</option>:
+    instructs the build system to build the additional modules.</para>
 
     <para><command>mv -v /usr/share/OpenCV/3rdparty/lib/libippicv.a
-    /usr/lib</command>: This command move a library to a location where it 
+    /usr/lib</command>: This command moves a library to a location where it
     can be found.</para>
 
Index: introduction/welcome/changelog.xml
===================================================================
--- introduction/welcome/changelog.xml	(revision 170773d3e2d82b96bd3918ae360b8f770736c811)
+++ introduction/welcome/changelog.xml	(revision d4556806e4d8770ea1b3fa3c86e04532369f0eaf)
@@ -47,4 +47,8 @@
       <itemizedlist>
         <listitem>
+          <para>[pierre] - Fix building of gst-plugins-bad when opencv
+          is present.</para>
+        </listitem>
+        <listitem>
           <para>[renodr] - Update to gtk+-3.22.5. Fixes
           <ulink url="&blfs-ticket-root;8631">#8631</ulink>.</para>
Index: multimedia/libdriv/gst10-plugins-bad.xml
===================================================================
--- multimedia/libdriv/gst10-plugins-bad.xml	(revision 170773d3e2d82b96bd3918ae360b8f770736c811)
+++ multimedia/libdriv/gst10-plugins-bad.xml	(revision d4556806e4d8770ea1b3fa3c86e04532369f0eaf)
@@ -124,5 +124,5 @@
       <xref linkend="neon"/>,
       <xref linkend="nettle"/>,
-      <xref linkend="opencv"/>,
+      <xref linkend="opencv"/> (with additional modules),
       <xref linkend="openjpeg"/> or
       <xref linkend="openjpeg2"/>,
@@ -184,4 +184,5 @@
 <screen><userinput>./configure --prefix=/usr     \
             --disable-wayland \
+            --disable-opencv  \
             --with-package-name="GStreamer Bad Plugins &gst10-plugins-bad-version; BLFS" \
             --with-package-origin="http://www.linuxfromscratch.org/blfs/view/svn/" &amp;&amp;
@@ -206,4 +207,10 @@
       <parameter>--disable-wayland</parameter>: This switch is required
       without a full wayland based desktop environment.
+    </para>
+
+    <para>
+      <parameter>--disable-opencv</parameter>: This switch is required
+      if <xref linkend="opencv"/> is installed without additional modules
+      (specifically bgsegm).
     </para>
 
