Update documentation
This commit is contained in:
parent
d2498e8a04
commit
99e3a06d39
24 changed files with 3016 additions and 12756 deletions
|
@ -1,14 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vision — CompLib 0.0.2 documentation</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<title>Vision — CompLib 0.0.2 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
|
||||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
@ -80,7 +83,7 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="vision">
|
||||
<section id="vision">
|
||||
<span id="lib-vision"></span><h1>Vision<a class="headerlink" href="#vision" title="Permalink to this headline"></a></h1>
|
||||
<p>This module provides an interface for grabbing an rtmp stream and using the images to do some processing in opencv.</p>
|
||||
<p>How do I use this module?</p>
|
||||
|
@ -90,14 +93,49 @@
|
|||
<li><p>Publish the processed frames on an http server</p></li>
|
||||
<li><p>You can view the http stream of your processed images in a web browser</p></li>
|
||||
</ol>
|
||||
<div class="section" id="opencv-stream">
|
||||
<section id="opencv-stream">
|
||||
<h2>Opencv Stream<a class="headerlink" href="#opencv-stream" title="Permalink to this headline"></a></h2>
|
||||
<p>Because of the rtmp stream needing to buffer some frames and waiting for P-Frames, importing this module might take up
|
||||
to 5 Seconds.</p>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="compLib.Vision.__Streaming">
|
||||
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Vision.</span></span><span class="sig-name descname"><span class="pre">__Streaming</span></span><a class="headerlink" href="#compLib.Vision.__Streaming" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Class that handles rtmp streaming for opencv.</p>
|
||||
<p>DO NOT CREATE AN INSTANCE OF THIS CLASS YOURSELF!</p>
|
||||
<p>This is automatically done when importing this module. Use Vision.Streaming which is
|
||||
an instance of this class!</p>
|
||||
<p>grab frames -> do your own processing -> publish frame -> view on http server</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Vision.__Streaming.get_frame">
|
||||
<span class="sig-name descname"><span class="pre">get_frame</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Vision.__Streaming.get_frame" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Grab the newest frame from the rtmp stream.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>An opencv frame</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="compLib.Vision.__Streaming.publish_frame">
|
||||
<span class="sig-name descname"><span class="pre">publish_frame</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Vision.__Streaming.publish_frame" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Publish an opencv frame to the http webserver.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>image</strong> – Opencv frame that will be published</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>None</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
|
||||
<div class="section" id="using-the-vision-module">
|
||||
<section id="using-the-vision-module">
|
||||
<h3>Using the Vision Module<a class="headerlink" href="#using-the-vision-module" title="Permalink to this headline"></a></h3>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cv2</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib</span> <span class="kn">import</span> <span class="n">Vision</span>
|
||||
|
@ -117,8 +155,8 @@ your raspberry pi camera. Note: the stream will lag a little bit BUT the process
|
|||
realtime.</p>
|
||||
<p>The output on the website should show whatever your raspberry pi cam records:</p>
|
||||
<a class="reference internal image-reference" href="../_images/opencv_http_stream.png"><img alt="Processed frames from opencv" src="../_images/opencv_http_stream.png" style="width: 680px;" /></a>
|
||||
</div>
|
||||
<div class="section" id="chessboard-detection">
|
||||
</section>
|
||||
<section id="chessboard-detection">
|
||||
<h3>Chessboard Detection<a class="headerlink" href="#chessboard-detection" title="Permalink to this headline"></a></h3>
|
||||
<p>In this example we process the captured stream of images and want to detect chessboards. Run this example and
|
||||
point your raspberry pi camera to a chessboard and it should be detected.</p>
|
||||
|
@ -151,9 +189,9 @@ point your raspberry pi camera to a chessboard and it should be detected.</p>
|
|||
<a class="reference internal image-reference" href="../_images/chessboard_detected.jpg"><img alt="Processed frames from opencv" src="../_images/chessboard_detected.jpg" style="width: 680px;" /></a>
|
||||
<p>Here is a screenshot of the stream website while viewing the chessboard in this documentation.</p>
|
||||
<a class="reference internal image-reference" href="../_images/opencv_processed.png"><img alt="Processed frames from opencv" src="../_images/opencv_processed.png" style="width: 680px;" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
Reference in a new issue