<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/6276cc0fe90a4463e8c8ae47/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6276cc0fe90a4463e8c8ae47/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">A<span class="_ _0"></span>d<span class="_ _0"></span>ri<span class="_ _0"></span>a<span class="_ _0"></span>n K<span class="_ _0"></span>ae<span class="_ _0"></span>hl<span class="_ _0"></span>er & G<span class="_ _0"></span>a<span class="_ _0"></span>r<span class="_ _1"></span>y Br<span class="_ _0"></span>a<span class="_ _0"></span>ds<span class="_ _0"></span>ki </div><div class="t m0 x2 h3 y2 ff2 fs1 fc1 sc0 ls1 ws1"> <span class="_ _2"></span>L<span class="_ _0"></span>e<span class="_ _3"></span>arni<span class="_ _0"></span>n<span class="_ _4"></span>g</div><div class="t m0 x2 h4 y3 ff3 fs2 fc1 sc0 ls2 ws2"> O<span class="_ _5"></span>p<span class="_ _6"></span>e<span class="_ _7"></span>nC<span class="_ _8"></span>V<span class="_ _9"></span> <span class="_ _a"> </span>3</div><div class="t m0 x3 h5 y4 ff4 fs3 fc1 sc0 ls3 ws3">COMP<span class="_ _0"></span>UTER VIS<span class="_ _0"></span>ION IN C<span class="_ _3"></span>++ WITH THE OPENCV LIBR<span class="_ _1"></span>AR<span class="_ _0"></span>Y</div></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,0.000000,0.000000]}'></div></div>
</body>
</html>
<div id="pf2" class="pf w0 h6" data-page-no="2"><div class="pc pc2 w0 h6"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6276cc0fe90a4463e8c8ae47/bg2.jpg"></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,0.000000,0.000000]}'></div></div>
<div id="pf3" class="pf w0 h7" data-page-no="3"><div class="pc pc3 w0 h7"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6276cc0fe90a4463e8c8ae47/bg3.jpg"><div class="t m0 x4 h8 y5 ff5 fs4 fc2 sc0 ls0 ws0">Adrian Kaehler and Gary Bradski</div><div class="t m0 x5 h9 y6 ff6 fs5 fc2 sc0 ls0 ws0">Learning OpenCV 3</div><div class="t m0 x6 ha y7 ff5 fs6 fc2 sc0 ls0 ws0">Computer Vision in C++ with</div><div class="t m0 x7 ha y8 ff5 fs6 fc2 sc0 ls0 ws0">the OpenCV Library</div><div class="c x8 y9 w2 hb"><div class="t m0 x9 hc ya ff7 fs7 fc2 sc0 ls0 ws0">Boston<span class="_ _b"> </span>Farnham<span class="_ _c"> </span>Sebastopol</div><div class="t m0 xa hc yb ff7 fs7 fc2 sc0 ls0 ws0">Tokyo</div><div class="t m0 x0 hc ya ff7 fs7 fc2 sc0 ls0 ws0">Beijing<span class="_ _d"> </span>Boston<span class="_ _b"> </span>Farnham<span class="_ _c"> </span>Sebastopol</div><div class="t m0 xa hc yb ff7 fs7 fc2 sc0 ls0 ws0">Tokyo</div><div class="t m0 x0 hc ya ff7 fs7 fc2 sc0 ls0 ws0">Beijing</div></div></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,0.000000,0.000000]}'></div></div>
<div id="pf4" class="pf w0 h7" data-page-no="4"><div class="pc pc4 w0 h7"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6276cc0fe90a4463e8c8ae47/bg4.jpg"><div class="t m0 xb hd yc ff8 fs8 fc2 sc0 ls0 ws0">978-1-491-93799-0</div><div class="t m0 xb hd yd ff8 fs8 fc2 sc0 ls0 ws0">[M]</div><div class="t m0 xb he ye ff6 fs9 fc2 sc0 ls0 ws0">Learning OpenCV 3</div><div class="t m0 xb hd yf ff8 fs8 fc2 sc0 ls0 ws0">by Adrian Kaehler and Gary Bradski</div><div class="t m0 xb hd y10 ff8 fs8 fc2 sc0 ls0 ws0">Copyright © 2017 Adrian Kaehler, Gary Bradski. All rights reserved.</div><div class="t m0 xb hd y11 ff8 fs8 fc2 sc0 ls0 ws0">Printed in the United States of America.</div><div class="t m0 xb hd y12 ff8 fs8 fc2 sc0 ls0 ws0">Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.</div><div class="t m0 xb hd y13 ff8 fs8 fc2 sc0 ls0 ws4">O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are</div><div class="t m0 xb hf y14 ff8 fs8 fc2 sc0 ls0 ws5">also available for most titles (<span class="ff9 fc3 ws0">http://www.oreilly.com/safari</span>). For more information, contact our corpo‐</div><div class="t m0 xb hf y15 ff8 fs8 fc2 sc0 ls0 ws0">rate/institutional sales department: 800-998-9938 or <span class="ff9">corporate@oreilly.com</span>.</div><div class="t m0 xb h10 y16 ff6 fsa fc2 sc0 ls0 ws0">Editor:<span class="ff8 fs8"> <span class="_ _1"></span>Dawn Schanafelt<span class="_ _e"> </span></span>Indexer:<span class="ff8 fs8"> <span class="_ _1"></span>Ellen Troutman</span></div><div class="t m0 xb h10 y17 ff6 fsa fc2 sc0 ls0 ws0">Production <span class="_ _1"></span>Editor:<span class="ff8 fs8"> Kristen<span class="_ _1"></span> Brown<span class="_ _f"> </span></span>Interior <span class="_ _1"></span>Designer:<span class="ff8 fs8"> David<span class="_ _1"></span> Futato</span></div><div class="t m0 xb h10 y18 ff6 fsa fc2 sc0 ls0 ws0">Copyeditor:<span class="ff8 fs8"> <span class="_ _1"></span>Rachel Monaghan<span class="_ _10"> </span></span>Cover <span class="_ _1"></span>Designer:<span class="ff8 fs8"> Karen<span class="_ _1"></span> Montgomery</span></div><div class="t m0 xb h10 y19 ff6 fsa fc2 sc0 ls0 ws0">Proofreader:<span class="ff8 fs8"> <span class="_ _1"></span>James Fraleigh<span class="_ _11"> </span></span>Illustrator:<span class="ff8 fs8"> <span class="_ _1"></span>Rebecca Demarest</span></div><div class="t m0 xb hd y1a ff8 fs8 fc2 sc0 ls0 ws0">December 2016:<span class="_ _12"> </span> First Edition</div><div class="t m0 xb h10 y1b ff6 fsa fc2 sc0 ls0 ws0">Revision History for the First Edition</div><div class="t m0 xb hd y1c ff8 fs8 fc2 sc0 ls0 ws0">2016-12-09: <span class="_ _13"> </span>First Release</div><div class="t m0 xb hf y1d ff8 fs8 fc2 sc0 ls0 ws0">See <span class="ff9 fc3">http://oreilly.com/catalog/errata.csp?isbn=9781491937990</span> for release details.</div><div class="t m0 xb hf y1e ff8 fs8 fc2 sc0 ls0 ws6">The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. <span class="ff9">Learning OpenCV 3</span>, the cover image,</div><div class="t m0 xb hd y1f ff8 fs8 fc2 sc0 ls0 ws0">and related trade dress are trademarks of O’Reilly Media, Inc.</div><div class="t m0 xb hd y20 ff8 fs8 fc2 sc0 ls0 ws7">While the publisher and the authors have used good faith efforts to ensure that the information and</div><div class="t m0 xb hd y21 ff8 fs8 fc2 sc0 ls0 ws8">instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility</div><div class="t m0 xb hd y22 ff8 fs8 fc2 sc0 ls0 ws9">for errors or omissions, including without limitation responsibility for damages resulting from the use of</div><div class="t m0 xb hd y23 ff8 fs8 fc2 sc0 ls0 wsa">or reliance on this work. Use of the information and instructions contained in this work is at your own</div><div class="t m0 xb hd y24 ff8 fs8 fc2 sc0 ls0 wsb">risk. If any code samples or other technology this work contains or describes is subject to open source</div><div class="t m0 xb hd y25 ff8 fs8 fc2 sc0 ls0 wsc">licenses or the intellectual property rights of others, it is your responsibility to ensure that your use</div><div class="t m0 xb hd y26 ff8 fs8 fc2 sc0 ls0 ws0">thereof complies with such licenses and/or rights.</div><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,0.000000,0.000000]}'></div></div>
<div id="pf5" class="pf w0 h7" data-page-no="5"><div class="pc pc5 w0 h7"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6276cc0fe90a4463e8c8ae47/bg5.jpg"><div class="t m0 xc h11 y27 ff6 fsb fc2 sc0 ls0 ws0">Table of Contents</div><div class="t m0 xb h12 y28 ff6 fsc fc0 sc0 ls0 ws0">Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <span class="_ _14"></span> xv</div><div class="t m0 xd h12 y29 ff6 fsc fc2 sc0 ls0 ws0">1.</div><div class="t m0 xe h12 y2a ff6 fsc fc0 sc0 ls0 ws0">Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <span class="_ _14"></span> 1</div><div class="t m0 xe h13 y2b ff8 fsd fc0 sc0 ls0 ws0">What Is OpenCV? <span class="_ _15"></span>1</div><div class="t m0 xe h13 y2c ff8 fsd fc0 sc0 ls0 ws0">Who Uses OpenCV? 2</div><div class="t m0 xe h13 y2d ff8 fsd fc0 sc0 ls0 ws0">What Is Computer Vision? <span class="_ _1"></span>3</div><div class="t m0 xe h13 y2e ff8 fsd fc0 sc0 ls0 ws0">The Origin of OpenCV <span class="_ _16"></span>6</div><div class="t m0 xf h13 y2f ff8 fsd fc0 sc0 ls0 ws0">OpenCV Block Diagram <span class="_ _16"> </span>8</div><div class="t m0 xf h13 y30 ff8 fsd fc0 sc0 ls0 ws0">Speeding Up OpenCV with IPP <span class="_ _15"></span>9</div><div class="t m0 xf h13 y31 ff8 fsd fc0 sc0 ls0 ws0">Who Owns OpenCV? <span class="_ _15"></span>10</div><div class="t m0 xe h13 y32 ff8 fsd fc0 sc0 ls0 ws0">Downloading and Installing OpenCV <span class="_ _15"></span>10</div><div class="t m0 xf h13 y33 ff8 fsd fc0 sc0 ls0 ws0">Installation <span class="_"> </span>10</div><div class="t m0 xe h13 y34 ff8 fsd fc0 sc0 ls0 ws0">Getting the Latest OpenCV via Git <span class="_ _7"></span>13</div><div class="t m0 xe h13 y35 ff8 fsd fc0 sc0 ls0 ws0">More OpenCV Documentation <span class="_ _1"></span>13</div><div class="t m0 xf h13 y36 ff8 fsd fc0 sc0 ls0 ws0">Supplied Documentation <span class="_ _7"></span>14</div><div class="t m0 xf h13 y37 ff8 fsd fc0 sc0 ls0 ws0">Online Documentation and the Wiki <span class="_ _16"> </span>14</div><div class="t m0 xe h13 y38 ff8 fsd fc0 sc0 ls0 ws0">OpenCV Contribution Repository <span class="_ _1"></span>17</div><div class="t m0 xf h13 y39 ff8 fsd fc0 sc0 ls0 ws0">Downloading and Building Contributed Modules <span class="_ _16"> </span>17</div><div class="t m0 xe h13 y3a ff8 fsd fc0 sc0 ls0 ws0">Portability 18</div><div class="t m0 xe h13 y3b ff8 fsd fc0 sc0 ls0 ws0">Summary <span class="_ _7"></span>19</div><div class="t m0 xe h13 y3c ff8 fsd fc0 sc0 ls0 ws0">Exercises <span class="_ _7"></span>19</div><div class="t m0 xd h12 y3d ff6 fsc fc2 sc0 ls0 ws0">2.</div><div class="t m0 xe h12 y3e ff6 fsc fc0 sc0 ls0 ws0">Introduction to OpenCV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <span class="_ _17"> </span> 21</div><div class="t m0 xe h13 y3f ff8 fsd fc0 sc0 ls0 ws0">Include Files <span class="_ _1"></span>21</div><div class="t m0 xf h13 y40 ff8 fsd fc0 sc0 ls0 ws0">Resources <span class="_ _15"></span>22</div><div class="t m0 xe h13 y41 ff8 fsd fc0 sc0 ls0 ws0">First Program—Display a Picture <span class="_"> </span>23</div><div class="t m0 xe h13 y42 ff8 fsd fc0 sc0 ls0 ws0">Second Program—Video <span class="_ _7"></span>25</div><div class="t m0 xe h13 y43 ff8 fsd fc0 sc0 ls0 ws0">Moving Around <span class="_"> </span>27</div><div class="t m0 x10 h10 y44 ff6 fsa fc2 sc0 ls0 ws0">iii</div><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,0.000000,0.000000]}'></div></div>