[36336d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY cvdir "/projects/opencvlibrary/files">
|
---|
| 8 |
|
---|
[d455680] | 9 | <!ENTITY opencv-download-http "&sourceforge-repo2;&cvdir;/opencv-unix/&opencv-version;/opencv-&opencv-version;.zip">
|
---|
| 10 | <!ENTITY opencv-download-ftp " ">
|
---|
[937adc0] | 11 | <!ENTITY opencv-md5sum "bfc6a261eb069b709bcfe7e363ef5899">
|
---|
| 12 | <!ENTITY opencv-size "78 MB">
|
---|
| 13 | <!ENTITY opencv-buildsize "556 MB">
|
---|
| 14 | <!ENTITY opencv-time "8.1 SBU">
|
---|
[e6ce0692] | 15 |
|
---|
| 16 |
|
---|
[d455680] | 17 | <!ENTITY ippicv-version "20151201">
|
---|
| 18 | <!ENTITY ippicv_binaries_commit "81a676001ca8075ada498583e4166079e5744668">
|
---|
| 19 |
|
---|
| 20 | <!ENTITY opencv-contrib-download "https://github.com/opencv/opencv_contrib/archive/&opencv-version;.tar.gz">
|
---|
[36336d8] | 21 | ]>
|
---|
| 22 |
|
---|
| 23 | <sect1 id="opencv" xreflabel="opencv-&opencv-version;">
|
---|
| 24 | <?dbhtml filename="opencv.html"?>
|
---|
| 25 |
|
---|
| 26 | <sect1info>
|
---|
[d027410] | 27 | <othername>$LastChangedBy$</othername>
|
---|
| 28 | <date>$Date$</date>
|
---|
[36336d8] | 29 | </sect1info>
|
---|
| 30 |
|
---|
| 31 | <title>opencv-&opencv-version;</title>
|
---|
| 32 |
|
---|
| 33 | <indexterm zone="opencv">
|
---|
| 34 | <primary sortas="a-opencv">opencv</primary>
|
---|
| 35 | </indexterm>
|
---|
| 36 |
|
---|
| 37 | <sect2 role="package">
|
---|
| 38 | <title>Introduction to opencv</title>
|
---|
| 39 |
|
---|
| 40 | <para>
|
---|
[f3429309] | 41 | The <application>opencv</application> package contains graphics libraries
|
---|
[36336d8] | 42 | mainly aimed at real-time computer vision.
|
---|
| 43 | </para>
|
---|
| 44 |
|
---|
[dd8ae08] | 45 | &lfs7a_checked;
|
---|
[36336d8] | 46 |
|
---|
| 47 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 48 | <itemizedlist spacing="compact">
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>
|
---|
| 51 | Download (HTTP): <ulink url="&opencv-download-http;"/>
|
---|
| 52 | </para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>
|
---|
| 56 | Download (FTP): <ulink url="&opencv-download-ftp;"/>
|
---|
| 57 | </para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>
|
---|
| 61 | Download MD5 sum: &opencv-md5sum;
|
---|
| 62 | </para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>
|
---|
| 66 | Download size: &opencv-size;
|
---|
| 67 | </para>
|
---|
| 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>
|
---|
| 71 | Estimated disk space required: &opencv-buildsize;
|
---|
| 72 | </para>
|
---|
| 73 | </listitem>
|
---|
| 74 | <listitem>
|
---|
| 75 | <para>
|
---|
| 76 | Estimated build time: &opencv-time;
|
---|
| 77 | </para>
|
---|
| 78 | </listitem>
|
---|
| 79 | </itemizedlist>
|
---|
| 80 |
|
---|
| 81 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[d455680] | 82 | <itemizedlist spacing="compact">
|
---|
| 83 | <listitem>
|
---|
| 84 | <para>
|
---|
| 85 | Optional file (will be downloaded when running cmake if not present):
|
---|
| 86 | <ulink
|
---|
| 87 | url="https://raw.githubusercontent.com/opencv/opencv_3rdparty/&ippicv_binaries_commit;/ippicv/ippicv_linux_&ippicv-version;.tgz"/>
|
---|
| 88 | </para>
|
---|
| 89 | </listitem>
|
---|
| 90 | <listitem>
|
---|
| 91 | <para>
|
---|
| 92 | Optional additional modules: <ulink
|
---|
| 93 | url="&opencv-contrib-download;"/>
|
---|
| 94 | </para>
|
---|
| 95 | </listitem>
|
---|
| 96 | </itemizedlist>
|
---|
| 97 |
|
---|
| 98 | <note>
|
---|
| 99 | <para>Download the additional modules via wget as:</para>
|
---|
| 100 | <screen><userinput>wget &opencv-contrib-download; \
|
---|
| 101 | -O opencv_contrib-&opencv-version;.tar.gz</userinput></screen>
|
---|
| 102 | </note>
|
---|
[36336d8] | 103 |
|
---|
[f3429309] | 104 | <bridgehead renderas="sect3">opencv Dependencies</bridgehead>
|
---|
[36336d8] | 105 |
|
---|
| 106 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 107 | <para role="required">
|
---|
| 108 | <xref linkend="cmake"/> and
|
---|
| 109 | <xref linkend="unzip"/>
|
---|
| 110 | </para>
|
---|
| 111 |
|
---|
| 112 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 113 | <para role="recommended">
|
---|
| 114 | <xref linkend="ffmpeg"/>,
|
---|
| 115 | <xref linkend="gst10-plugins-base"/>,
|
---|
| 116 | <xref linkend="gtk3"/>,
|
---|
| 117 | <xref linkend="jasper"/>,
|
---|
| 118 | <xref linkend="libjpeg"/>,
|
---|
| 119 | <xref linkend="libpng"/>,
|
---|
| 120 | <xref linkend="libtiff"/>,
|
---|
[f3429309] | 121 | <xref linkend="libwebp"/>,
|
---|
| 122 | <xref linkend="python2"/>,
|
---|
[36336d8] | 123 | <xref linkend="v4l-utils"/>, and
|
---|
| 124 | <xref linkend="xine-lib"/>
|
---|
| 125 | </para>
|
---|
| 126 |
|
---|
| 127 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 128 | <para role="optional">
|
---|
[f3429309] | 129 | <xref linkend="apache-ant"/>,
|
---|
| 130 | <xref linkend="doxygen"/>,
|
---|
| 131 | <xref linkend="java"/>,
|
---|
[36336d8] | 132 | <xref linkend="python3"/>,
|
---|
| 133 | <ulink url="https://developer.nvidia.com/cuda-zone">Cuda</ulink>,
|
---|
| 134 | <ulink url="http://eigen.tuxfamily.org/">Eigen</ulink>,
|
---|
| 135 | <ulink url="http://www.openexr.com/">OpenEXR</ulink>,
|
---|
| 136 | <ulink url="http://gcd.joewheaton.org/">GCD</ulink>,
|
---|
| 137 | <ulink url="http://www.gdal.org/">GDAL</ulink>,
|
---|
| 138 | <ulink url="http://www.jai.com/en/support/gigevisionsdkcontroltoolv130">GigEVisionSDK</ulink>,
|
---|
| 139 | <ulink url="http://jackaudio.org/">JACK</ulink>,
|
---|
| 140 | <ulink url="http://sourceforge.net/projects/libdc1394/">libdc1394</ulink>,
|
---|
| 141 | <ulink url="http://www.gphoto.org/">libgphoto2</ulink>,
|
---|
| 142 | <ulink url="http://www.numpy.org/">NumPy</ulink>,
|
---|
| 143 | <ulink url="http://structure.io/openni">OpenNI</ulink>,
|
---|
| 144 | <ulink url="http://plantuml.sourceforge.net/">PlanetUML</ulink>,
|
---|
| 145 | <ulink url="http://www.1stvision.com/AVT-gige-camera-software-downloads.html">PvAPI</ulink>,
|
---|
| 146 | <ulink url="https://www.threadingbuildingblocks.org/">Threading Building Blocks (TBB)</ulink>,
|
---|
| 147 | <ulink url="http://unicap-imaging.org/">UniCap</ulink>,
|
---|
| 148 | <ulink url="http://www.vtk.org/">VTK - The Visualization Toolkit</ulink>, and
|
---|
| 149 | <ulink url="http://www.ximea.com/">XIMEA</ulink>
|
---|
| 150 | </para>
|
---|
| 151 |
|
---|
| 152 | <para condition="html" role="usernotes">
|
---|
| 153 | User Notes: <ulink url="&blfs-wiki;/opencv"/>
|
---|
| 154 | </para>
|
---|
| 155 | </sect2>
|
---|
| 156 |
|
---|
| 157 | <sect2 role="installation">
|
---|
| 158 | <title>Installation of opencv</title>
|
---|
| 159 |
|
---|
| 160 | <para>
|
---|
| 161 | If the optional Integrated Performance Primitives (IPP) package has been
|
---|
| 162 | downloaded, put it in place so the cmake script does not try to download
|
---|
| 163 | it again:
|
---|
| 164 | </para>
|
---|
| 165 |
|
---|
[e6ce0692] | 166 | <screen><userinput>ipp_file=../ippicv_linux_&ippicv-version;.tgz &&
|
---|
[36336d8] | 167 | ipp_hash=$(md5sum $ipp_file | cut -d" " -f1) &&
|
---|
| 168 | ipp_dir=3rdparty/ippicv/downloads/linux-$ipp_hash &&
|
---|
| 169 |
|
---|
| 170 | mkdir -p $ipp_dir &&
|
---|
| 171 | cp $ipp_file $ipp_dir</userinput></screen>
|
---|
| 172 |
|
---|
[d455680] | 173 | <para>
|
---|
| 174 | If needed, unpack the additional modules package:
|
---|
| 175 | </para>
|
---|
| 176 |
|
---|
| 177 | <screen><userinput>tar xf ../opencv_contrib-&opencv-version;.tar.gz</userinput></screen>
|
---|
| 178 |
|
---|
[36336d8] | 179 | <para>
|
---|
| 180 | Install <application>opencv</application> by running the following
|
---|
| 181 | commands:
|
---|
| 182 | </para>
|
---|
| 183 |
|
---|
| 184 | <screen><userinput>mkdir build &&
|
---|
| 185 | cd build &&
|
---|
| 186 |
|
---|
[0134954] | 187 | cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
---|
| 188 | -DWITH_XINE=ON \
|
---|
| 189 | -DBUILD_TESTS=OFF \
|
---|
| 190 | -DENABLE_PRECOMPILED_HEADERS=OFF \
|
---|
| 191 | -Wno-dev .. &&
|
---|
[36336d8] | 192 | make</userinput></screen>
|
---|
| 193 |
|
---|
| 194 | <para>
|
---|
| 195 | The package does not come with an operable test suite.
|
---|
| 196 | </para>
|
---|
| 197 |
|
---|
| 198 | <para>
|
---|
| 199 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 200 | </para>
|
---|
| 201 |
|
---|
[937adc0] | 202 | <screen role="root"><userinput>make install &&
|
---|
| 203 |
|
---|
| 204 | case $(uname -m) in
|
---|
| 205 | x86_64) ARCH=intel64 ;;
|
---|
| 206 | *) ARCH=ia32 ;;
|
---|
| 207 | esac &&
|
---|
| 208 |
|
---|
| 209 | cp -v 3rdparty/ippicv/ippicv_lnx/lib/$ARCH/libippicv.a /usr/lib &&
|
---|
| 210 | unset ARCH</userinput></screen>
|
---|
[36336d8] | 211 |
|
---|
| 212 | </sect2>
|
---|
| 213 |
|
---|
| 214 | <sect2 role="commands">
|
---|
| 215 | <title>Command Explanations</title>
|
---|
| 216 |
|
---|
[e6ce0692] | 217 | <para><parameter>-DWITH_XINE=ON</parameter>: This option instructs the make
|
---|
| 218 | procedure to use <xref linkend="xine-lib"/>.</para>
|
---|
[36336d8] | 219 |
|
---|
[0134954] | 220 | <para><parameter>-DENABLE_PRECOMPILED_HEADERS=OFF</parameter>: This option
|
---|
| 221 | is needed for compatibiiity with gcc-6.1 and later.</para>
|
---|
| 222 |
|
---|
[d455680] | 223 | <para><option>-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-&opencv-version;/modules</option>:
|
---|
| 224 | instructs the build system to build the additional modules.</para>
|
---|
[36336d8] | 225 |
|
---|
[937adc0] | 226 | <para><command>cp -v 3rdparty/.../libippicv.a /usr/lib</command>:
|
---|
| 227 | This command installs a 3rdparty library.</para>
|
---|
[e4d2b8d] | 228 |
|
---|
[36336d8] | 229 | </sect2>
|
---|
| 230 |
|
---|
| 231 | <sect2 role="content">
|
---|
| 232 | <title>Contents</title>
|
---|
| 233 |
|
---|
| 234 | <segmentedlist>
|
---|
| 235 | <segtitle>Installed Programs</segtitle>
|
---|
| 236 | <segtitle>Installed Libraries</segtitle>
|
---|
| 237 | <segtitle>Installed Directories</segtitle>
|
---|
| 238 |
|
---|
| 239 | <seglistitem>
|
---|
| 240 | <seg>
|
---|
| 241 | opencv_annotation,
|
---|
| 242 | opencv_createsamples, and
|
---|
| 243 | opencv_traincascade
|
---|
| 244 | </seg>
|
---|
| 245 | <seg>
|
---|
[937adc0] | 246 | libippicv.a,
|
---|
[36336d8] | 247 | libopencv_calib3d.so,
|
---|
| 248 | libopencv_core.so,
|
---|
| 249 | libopencv_features2d.so,
|
---|
| 250 | libopencv_flann.so,
|
---|
| 251 | libopencv_highgui.so,
|
---|
| 252 | libopencv_imgcodecs.so,
|
---|
| 253 | libopencv_imgproc.so,
|
---|
| 254 | libopencv_ml.so,
|
---|
| 255 | libopencv_objdetect.so,
|
---|
| 256 | libopencv_photo.so,
|
---|
| 257 | libopencv_shape.so,
|
---|
| 258 | libopencv_stitching.so,
|
---|
| 259 | libopencv_superres.so,
|
---|
[e6ce0692] | 260 | libopencv_ts.a,
|
---|
[36336d8] | 261 | libopencv_video.so,
|
---|
| 262 | libopencv_videoio.so, and
|
---|
| 263 | libopencv_videostab.so
|
---|
| 264 | </seg>
|
---|
| 265 | <seg>
|
---|
[e6ce0692] | 266 | /usr/include/opencv{,2} and
|
---|
[36336d8] | 267 | /usr/share/OpenCV
|
---|
| 268 | </seg>
|
---|
| 269 | </seglistitem>
|
---|
| 270 | </segmentedlist>
|
---|
| 271 | <!--
|
---|
| 272 | <variablelist>
|
---|
| 273 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 274 | <?dbfo list-presentation="list"?>
|
---|
| 275 | <?dbhtml list-presentation="table"?>
|
---|
| 276 |
|
---|
| 277 | <varlistentry id="opencv_annotation">
|
---|
| 278 | <term><command>opencv_annotation</command></term>
|
---|
| 279 | <listitem>
|
---|
| 280 | <para>
|
---|
| 281 | ???
|
---|
| 282 | </para>
|
---|
| 283 | <indexterm zone="opencv opencv_annotation">
|
---|
| 284 | <primary sortas="b-opencv">opencv_annotation</primary>
|
---|
| 285 | </indexterm>
|
---|
| 286 | </listitem>
|
---|
| 287 | </varlistentry>
|
---|
| 288 |
|
---|
| 289 | </variablelist>
|
---|
| 290 | -->
|
---|
| 291 | </sect2>
|
---|
| 292 |
|
---|
| 293 | </sect1>
|
---|