glfs/general/graphlib/opencv.xml
2024-01-19 22:39:35 +01:00

263 lines
7.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!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://github.com/opencv/opencv/archive/&opencv-version;/opencv-&opencv-version;.tar.gz">
<!ENTITY opencv-download-ftp " ">
<!ENTITY opencv-md5sum "153b4b8dd103b1bfe447f7dd1f22eac0">
<!ENTITY opencv-size "88 MB">
<!ENTITY opencv-buildsize "820 MB">
<!ENTITY opencv-time "7.4 SBU (using parallelism=4)">
<!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"?>
<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>
&lfs120_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 additional modules: <ulink
url="&opencv-contrib-download;"/>
</para>
</listitem>
</itemizedlist>
<note>
<para>
One additional file that starts with "ippicv" (integrated
performance primitives) will be automatically downloaded during the
cmake portion of the build procedure. This download is specific to the
system architecture.
</para>
</note>
<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="libexif"/>,
<xref linkend="libjpeg"/>,
<xref linkend="libpng"/>,
<xref linkend="libtiff"/>,
<xref linkend="libwebp"/>,
<xref linkend="openjpeg2"/>,
<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="numpy"/>,
<ulink url="https://math-atlas.sourceforge.net/">ATLAS</ulink>,
<ulink url="https://www.netlib.org/blas/">blas</ulink>,
<ulink url="https://developer.nvidia.com/cuda-zone">Cuda</ulink>,
<ulink url="https://eigen.tuxfamily.org/">Eigen</ulink>,
<ulink url="https://www.openexr.com/">OpenEXR</ulink>,
<ulink url="https://www.gdal.org/">GDAL</ulink>,
<ulink url="https://www.netlib.org/lapack/">lapack</ulink>,
<ulink url="https://sourceforge.net/projects/libdc1394/">libdc1394</ulink>,
<!-- <ulink url="https://www.numpy.org/">NumPy</ulink>, -->
<ulink url="https://github.com/oneapi-src/oneTBB">Threading Building Blocks (TBB)</ulink>, and
<ulink url="https://vtk.org/">VTK - The Visualization Toolkit</ulink>,
</para>
</sect2>
<sect2 role="installation">
<title>Installation of opencv</title>
<para>
If you downloaded the optional modules, unpack them now:
</para>
<screen><userinput>tar -xf ../opencv_contrib-&opencv-contrib-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 a test suite.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make install</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 compatibility 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 additional modules.
</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_interactive-calibration,
opencv_model_diagnostics,
opencv_version,
opencv_visualisation, and
setup_vars_opencv4.sh
</seg>
<seg>
libopencv_calib3d.so,
libopencv_core.so,
libopencv_dnn.so,
libopencv_features2d.so,
libopencv_flann.so,
libopencv_gapi.so,
libopencv_highgui.so,
libopencv_imgcodecs.so,
libopencv_imgproc.so,
libopencv_ml.so,
libopencv_objdetect.so,
libopencv_photo.so,
libopencv_stitching.so,
libopencv_video.so, and
libopencv_videoio.so
</seg>
<seg>
/usr/include/opencv4,
/usr/lib/cmake/opencv4,
/usr/lib/python&python3-majorver;/site-packages/cv2,
/usr/share/licenses/opencv4,
/usr/share/opencv4, and
/usr/share/java/opencv4
</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>