Files
AI-on-the-edge-device-docs/Reference-Image/index.html
2023-03-02 13:46:52 +00:00

306 lines
16 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><link rel="canonical" href="https://jomjol.github.io/AI-on-the-edge-device-docs/Reference-Image/" />
<link rel="shortcut icon" href="../img/favicon.ico" />
<title>Reference Image - AI on the Edge Device</title>
<link rel="stylesheet" href="../css/theme.css" />
<link rel="stylesheet" href="../css/theme_extra.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
<script>
// Current page data
var mkdocs_page_name = "Reference Image";
var mkdocs_page_input_path = "Reference-Image.md";
var mkdocs_page_url = "/AI-on-the-edge-device-docs/Reference-Image/";
</script>
<script src="../js/jquery-3.6.0.min.js" defer></script>
<!--[if lt IE 9]>
<script src="../js/html5shiv.min.js"></script>
<![endif]-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<img src=https://jomjol.github.io/AI-on-the-edge-device-docs//img/logo.png>
<a href=".." class="icon icon-home"> AI on the Edge Device
</a><div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Getting Started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="..">Welcome</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Installation/">Installation</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../initial-setup/">Initial Setup</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Hardware-Compatibility/">Hardware Compatibility</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Best-Practice/">Best Practice</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../FAQs/">Frequently Asked Questions</a>
</li>
</ul>
<p class="caption"><span class="caption-text">External Links</span></p>
<ul>
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/releases">Releases</a>
</li>
<li class="toctree-l1"><a class="" href="https://jomjol.github.io/AI-on-the-edge-device/index.html">Web Installer/Console</a>
</li>
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/issues">Place an Issue</a>
</li>
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/discussions">Join a Discussion</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Configuration</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal current" href="./">Reference Image</a>
<ul class="current">
<li class="toctree-l2"><a class="reference internal" href="#focus">Focus</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#correct-horizontal-alignment">Correct Horizontal Alignment</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#dealing-with-reflections">Dealing with Reflections</a>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Alignment/">Alignment References</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ROI-Configuration/">ROIs (Regions of Interest)</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Configuration/">Graphical Configuration</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Choosing-the-Model/">Model Selection</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ota/">Over-The-Air (OTA) Update</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Advanced</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Parameters/">Parameters</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Integration-Home-Assistant/">Integration into Home Assistant</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../External-LED/">External LED</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../data-logging/">Data Logging</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../rolling-installation/">Living on the Edge</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Watermeter-specific-analog---digital-transition/">Analog/Digital Transition on Water Meters</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../collect-new-images/">Collect images to improve the models</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Learn-models-with-your-own-images/">Learn a model with your own images</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Correction%20Algorithm/">Correction Algorithm</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Neural-Network-Types/">Neural Network Types</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Additional-Information/">Additional Information</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../New-Releases-Notification/">Notification about new Releases</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Troubleshooting</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Error-Codes/">Error Codes</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Error-Debugging/">Error Debugging</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Frequent-Reboots/">Frequent Reboots</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Demo-Mode/">Demo Mode</a>
</li>
</ul>
<p class="caption"><span class="caption-text">API's</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../REST-API/">REST API</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../MQTT-API/">MQTT API</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Influx-DB/">Influx DB</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Build-Instructions/">Build the Project</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Upload-files-by-script/">Scripted File Upload</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Testing/">Testing</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Release-creation/">Preparing for Release</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Old Pages (no longer maintained)</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../outdated--Integrated-Functions/">Integrated Functions</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Assorted Pages</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../StatusLED-BlinkCodes/">StatusLED BlinkCodes</a>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">AI on the Edge Device</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href=".." class="icon icon-home" alt="Docs"></a> &raquo;</li>
<li>Configuration &raquo;</li>
<li>Reference Image</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs/edit/main/docs/Reference-Image.md" class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div class="section" itemprop="articleBody">
<h1 id="reference-image">Reference Image</h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The Reference Image is the basis for the coordinate system of the ROIs. Therefore it is very important, to have a well aligned image, that is not rotated. </p>
</div>
<p>At first an example image is shown.
To define a new reference image push the button <code>"Create new Reference" (2)</code> and afterwards <code>"Take Image" (2)</code>. It might take some seconds for processing, then your actual camera image should be shown.
Then play with the provided parameters to get a good result.</p>
<p><img alt="" src="../img/initial_setup_1_reference_image.jpg" style="width:500px" /></p>
<h2 id="focus">Focus</h2>
<p>This is the first time, where you have access to the camera image. It most likely is out of focus and not sharp!
Ensure a sharp image of the camera by adjusting the focal length of the ESP OV2640 camera.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Try to adjust the focus for the clearest possible image!</p>
</div>
<p>In order to use it for reading a meter, the focal-length of the OV2640 camera has to be manipulated.
By default it only results in sharp image for distance bigger than around <code>~40cm</code> which is not ideal for our purpose.</p>
<p>Therefore you need to remove the fixing glue of the OV2640 lens with a sharp knife. After this you can rotate the lens in and out. Rotating it by about a quarter of a turn counterclockwise results in a focus plane shift of about 10cm. You need to figure out your best setting with a little bit of trial and error for your specific environment.</p>
<div class="admonition error">
<p class="admonition-title">Error</p>
<p>Be <strong>very</strong> carefully when rotating the lens. Best is to held the camera itself with one hand or a plier and rotate the lens with the other hand.
Make sure <strong>not</strong> to rotate the whole camera as this can damage the ribbon cable!</p>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This modification will void any warranty, as the sealing of the lens objective is broken!</p>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This modification will render the camera unsuitable for general, web-cam type applications unless the focal length is changed back to the original setting.</p>
</div>
<p><img alt="" src="../img/focus_adjustment.jpg" /></p>
<h2 id="correct-horizontal-alignment">Correct Horizontal Alignment</h2>
<p>Ensure an <strong>exact horizontal alignment</strong> of the number:</p>
<table>
<thead>
<tr>
<th>✔️ Okay</th>
<th>❌ Not Okay</th>
</tr>
</thead>
<tbody>
<tr>
<td><img alt="" src="../img/alignment_okay.jpg" /></td>
<td><img alt="" src="../img/alignment_not_okay.jpg" /></td>
</tr>
</tbody>
</table>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Updating the reference image also means that all alignment images and ROIs needs to be configured again.
Therefore do this step later only with caution.</p>
</div>
<p>If everything is done, you can save the result with <code>"Update Reference Image" (4)</code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>A reboot is not required at this point of time.</p>
</div>
<p>As next you should update the <a href="../Alignment/">Alignment References</a>.</p>
<h2 id="dealing-with-reflections">Dealing with Reflections</h2>
<p>Reflections can be caused by the flash LED and make it hard to provide a reliable detection.
There are various ways to deal with them:</p>
<ul>
<li>Attach a diffusor in front of the LED, eg. a filt (Filz) or parchment paper. Also white paper can do the job.</li>
<li>Rotate the ESP-CAM so the LED is on another place.</li>
<li>Reduce the LED intensity.</li>
<li>Use external LED stripes, eg <code>WS2812x</code>.</li>
</ul>
</div>
</div><footer>
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
<a href="../FAQs/" class="btn btn-neutral float-left" title="Frequently Asked Questions"><span class="icon icon-circle-arrow-left"></span> Previous</a>
<a href="../Alignment/" class="btn btn-neutral float-right" title="Alignment References">Next <span class="icon icon-circle-arrow-right"></span></a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" aria-label="Versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span>
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs" class="fa fa-github" style="color: #fcfcfc"> GitHub</a>
</span>
<span><a href="../FAQs/" style="color: #fcfcfc">&laquo; Previous</a></span>
<span><a href="../Alignment/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script>var base_url = '..';</script>
<script src="../js/theme_extra.js" defer></script>
<script src="../js/theme.js" defer></script>
<script src="../search/main.js" defer></script>
<script defer>
window.onload = function () {
SphinxRtdTheme.Navigation.enable(true);
};
</script>
</body>
</html>