glfs/general/graphlib/opencv.xml
Bruce Dubbs 5b5575b10b iBring Chapter 10 up to date
Update to pixman-0.36.0. 
Update to opencv_contrib-3.4.4. 
Update to libwebp-1.0.1. 
Update to librsvg-2.44.9. 
Update to libjpeg-turbo-2.0.1. 
Update to harfbuzz-2.2.0. 
Update to babl-0.1.60. 
Update to LibRaw-0.19.1. 



git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@20764 af4574ff-66df-0310-9fd7-8a98e5e911e0
2018-11-30 21:05:43 +00:00

290 lines
9.1 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY opencv-download-http "https://sourceforge.net/projects/opencvlibrary/files/opencv-unix/&opencv-version;/opencv-&opencv-version;.zip">
<!ENTITY opencv-download-ftp " ">
<!ENTITY opencv-md5sum "d63393fad89ae38eeddbc51b15d807fa">
<!ENTITY opencv-size "87 MB">
<!ENTITY opencv-buildsize "570 MB">
<!ENTITY opencv-time "2.6 SBU (using parallelism=4)">
<!ENTITY ippicv-version "ippicv_2017u3_lnx_intel64_general_20180518">
<!ENTITY ippicv_binaries_commit "bdb7bb85f34a8cb0d35e40a81f58da431aa1557a">
<!ENTITY opencv-contrib-download "https://github.com/opencv/opencv_contrib/archive/&opencv-version;/opencv_contrib-&opencv-contrib-version;.tar.gz">
]>
<sect1 id="opencv" xreflabel="opencv-&opencv-version;">
<?dbhtml filename="opencv.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>opencv-&opencv-version;</title>
<indexterm zone="opencv">
<primary sortas="a-opencv">opencv</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to opencv</title>
<para>
The <application>opencv</application> package contains graphics libraries
mainly aimed at real-time computer vision.
</para>
&lfs83_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&opencv-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&opencv-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &opencv-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &opencv-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &opencv-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &opencv-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Optional file (x86_64 only; will be downloaded when running cmake if not present):
<ulink
url="https://raw.githubusercontent.com/opencv/opencv_3rdparty/&ippicv_binaries_commit;/ippicv/&ippicv-version;.tgz"/>
</para>
</listitem>
<listitem>
<para>
Optional additional modules: <ulink
url="&opencv-contrib-download;"/>
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">opencv Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="cmake"/> and
<xref linkend="unzip"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="ffmpeg"/>,
<xref linkend="gst10-plugins-base"/>,
<xref linkend="gtk3"/>,
<xref linkend="jasper"/>,
<xref linkend="libjpeg"/>,
<xref linkend="libpng"/>,
<xref linkend="libtiff"/>,
<xref linkend="libwebp"/>,
<xref linkend="v4l-utils"/>, and
<xref linkend="xine-lib"/>
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="apache-ant"/>,
<xref linkend="doxygen"/>,
<xref linkend="java"/>,
<xref linkend="python2"/>,
<ulink url="https://developer.nvidia.com/cuda-zone">Cuda</ulink>,
<ulink url="http://eigen.tuxfamily.org/">Eigen</ulink>,
<ulink url="http://www.openexr.com/">OpenEXR</ulink>,
<ulink url="http://gcd.joewheaton.org/">GCD</ulink>,
<ulink url="http://www.gdal.org/">GDAL</ulink>,
<ulink url="http://www.jai.com/en/support/gigevisionsdkcontroltoolv130">GigEVisionSDK</ulink>,
<ulink url="http://jackaudio.org/">JACK</ulink>,
<ulink url="http://sourceforge.net/projects/libdc1394/">libdc1394</ulink>,
<ulink url="http://www.gphoto.org/">libgphoto2</ulink>,
<ulink url="http://www.numpy.org/">NumPy</ulink>,
<ulink url="http://structure.io/openni">OpenNI</ulink>,
<ulink url="http://plantuml.sourceforge.net/">PlanetUML</ulink>,
<ulink url="http://www.1stvision.com/AVT-gige-camera-software-downloads.html">PvAPI</ulink>,
<ulink url="https://www.threadingbuildingblocks.org/">Threading Building Blocks (TBB)</ulink>,
<ulink url="http://unicap-imaging.org/">UniCap</ulink>,
<ulink url="http://www.vtk.org/">VTK - The Visualization Toolkit</ulink>, and
<ulink url="http://www.ximea.com/">XIMEA</ulink>
</para>
<para condition="html" role="usernotes">
User Notes: <ulink url="&blfs-wiki;/opencv"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of opencv</title>
<para>
If the optional Integrated Performance Primitives (IPP) package has been
downloaded, put it in place so the cmake script does not try to download
it again:
</para>
<screen><userinput>ipp_file=&ippicv-version;.tgz &amp;&amp;
ipp_hash=$(md5sum ../$ipp_file | cut -d" " -f1) &amp;&amp;
ipp_dir=.cache/ippicv &amp;&amp;
mkdir -p $ipp_dir &amp;&amp;
cp ../$ipp_file $ipp_dir/$ipp_hash-$ipp_file</userinput></screen>
<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:
</para>
<screen><userinput>mkdir build &amp;&amp;
cd build &amp;&amp;
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_CXX11=ON \
-DBUILD_PERF_TESTS=OFF \
-DWITH_XINE=ON \
-DBUILD_TESTS=OFF \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_SKIP_RPATH=ON \
-DBUILD_WITH_DEBUG_INFO=OFF \
-Wno-dev .. &amp;&amp;
make</userinput></screen>
<para>
The package does not come with an operable test suite.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make install &amp;&amp;
case $(uname -m) in
x86_64) ARCH=intel64 ;;
*) ARCH=ia32 ;;
esac &amp;&amp;
cp -v 3rdparty/ippicv/ippicv_lnx/lib/$ARCH/libippicv.a /usr/lib &amp;&amp;
unset ARCH</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><parameter>-DWITH_XINE=ON</parameter>: This option instructs the make
procedure to use <xref linkend="xine-lib"/>.</para>
<para><parameter>-DENABLE_PRECOMPILED_HEADERS=OFF</parameter>: This option
is needed for compatibiiity with gcc-6.1 and later.</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>cp -v 3rdparty/.../libippicv.a /usr/lib</command>:
This command installs a 3rdparty library.</para>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
opencv_annotation,
opencv_createsamples, and
opencv_traincascade
</seg>
<seg>
libippicv.a,
libopencv_calib3d.so,
libopencv_core.so,
libopencv_features2d.so,
libopencv_flann.so,
libopencv_highgui.so,
libopencv_imgcodecs.so,
libopencv_imgproc.so,
libopencv_ml.so,
libopencv_objdetect.so,
libopencv_photo.so,
libopencv_shape.so,
libopencv_stitching.so,
libopencv_superres.so,
libopencv_ts.a,
libopencv_video.so,
libopencv_videoio.so, and
libopencv_videostab.so
</seg>
<seg>
/usr/include/opencv{,2} and
/usr/share/OpenCV
</seg>
</seglistitem>
</segmentedlist>
<!--
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="opencv_annotation">
<term><command>opencv_annotation</command></term>
<listitem>
<para>
???
</para>
<indexterm zone="opencv opencv_annotation">
<primary sortas="b-opencv">opencv_annotation</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
-->
</sect2>
</sect1>