Add protections for bad values #8

Merged
blizzardfinnegan merged 6 commits from devel into stable 2023-02-17 14:16:49 -05:00
13 changed files with 42 additions and 279 deletions

View file

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

3
.gitignore vendored
View file

@ -27,3 +27,6 @@ hs_err_pid*
target
*log.txt
**/.vscode
.classpath
.settings
.metadata

View file

@ -1,4 +0,0 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding/<project>=UTF-8

View file

@ -1,2 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=false

View file

@ -1,9 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View file

@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View file

@ -4,7 +4,7 @@
<groupId>org.baxter.disco</groupId>
<artifactId>ocr</artifactId>
<name>Disco OCR Accuracy Over Life Testing</name>
<version>4.2.0</version>
<version>4.3.1</version>
<description>Testing Discos for long-term accuracy, using automated optical character recognition.</description>
<organization>
<name>Baxter International</name>

View file

@ -1,195 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<XMI xmi.version="1.2" timestamp="2023-02-10T15:42:51" verified="false" xmlns:UML="http://schema.omg.org/spec/UML/1.4">
<XMI.header>
<XMI.documentation>
<XMI.exporter>umbrello uml modeller 2.32.3 http://umbrello.kde.org</XMI.exporter>
<XMI.exporterVersion>1.7.3</XMI.exporterVersion>
<XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
</XMI.documentation>
<XMI.metamodel xmi.name="UML" xmi.version="1.4" href="UML.xml"/>
</XMI.header>
<XMI.content>
<UML:Model xmi.id="m1" name="UML Model" isSpecification="false" isAbstract="false" isRoot="false" isLeaf="false">
<UML:Namespace.ownedElement>
<UML:Stereotype isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="folder" name="folder" namespace="m1" visibility="public"/>
<UML:Stereotype isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="enum" name="enum" namespace="m1" visibility="public"/>
<UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="Logical_View" name="Logical View" namespace="m1" visibility="public">
<UML:Namespace.ownedElement>
<UML:Package isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="Datatypes" name="Datatypes" namespace="Logical_View" visibility="public" stereotype="folder">
<UML:Namespace.ownedElement>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uUqvKBDseGBT8" name="char" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uGrxjnu3NdGkS" name="int" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uVQA5vV2PfHS8" name="float" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uGEdyb7rYtJbR" name="double" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uPmQePzXPYBFw" name="boolean" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="ugB3shC3HW3bt" name="String" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uFrDHAwcuLu0K" name="unsigned char" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uOsZBNUExO74y" name="signed char" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="u2ffQSb9S8oCt" name="unsigned int" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uNj6ThaQPbIRF" name="signed int" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="ux7SnrmHLMP8A" name="short int" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uOP09e19M6XCK" name="unsigned short int" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="ueY965tY2Anss" name="signed short int" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uup0uQtaupJA2" name="long int" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uTyQLcjDfE5al" name="signed long int" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uVD8KLYSNJr6R" name="unsigned long int" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uFtz80V1i6e6W" name="long double" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="utoLI0CURUNlO" name="wchar_t" namespace="Datatypes" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="utYklzpE90p78" name="File" namespace="Datatypes" comment="java.io.File" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uPLfPTeiCHApE" name="List" namespace="Datatypes" comment="java.util.List" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uhxf4utUB9yw9" name="Map" namespace="Datatypes" comment="java.util.Map" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uip7MVxfAQJ07" name="Scanner" namespace="Datatypes" comment="java.util.Scanner" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="ut2HhRXRKmg9Q" name="Set" namespace="Datatypes" comment="java.util.Set" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uVQDGnttxJGvw" name="LocalDateTime" namespace="Datatypes" comment="java.time.LocalDateTime" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uQZkGcvvHmpdc" name="FileOutputStream" namespace="Datatypes" comment="java.io.FileOutputStream" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uIR2BbP8pwas8" name="Cell" namespace="Datatypes" comment="org.apache.poi.ss.usermodel.Cell" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uwIkaSubmJlRi" name="Row" namespace="Datatypes" comment="org.apache.poi.ss.usermodel.Row" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uzOpHYFIPuTBE" name="XSSFSheet" namespace="Datatypes" comment="org.apache.poi.xssf.usermodel.XSSFSheet&#10;&#10;Sheet of an XLSX workbook, in Java-object form" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uVULczmLK2Ekp" name="XSSFWorkbook" namespace="Datatypes" comment="org.apache.poi.xssf.usermodel.XSSFWorkbook&#10;&#10;XLSX Workbook, in Java-object form" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uTOcOSNHuXJyP" name="BufferedWriter" namespace="Datatypes" comment="java.io.BufferedWriter" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uzX3hHbj5KewD" name="PrintStream" namespace="Datatypes" comment="java.io.PrintStream" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uaMTlVo6ZPlbv" name="DateTimeFormatter" namespace="Datatypes" comment="java.time.format.DateTimeFormatter" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uaL98Rm7EKgtM" name="FileWriter" namespace="Datatypes" comment="java.io.FileWriter" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uBFg3i6c9CmfL" name="Pi4J" namespace="Datatypes" comment="com.pi4j.Pi4J&#10;&#10;Pi4J Context; used to create GPIO objects" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="ur90bbehes6KP" name="Context" namespace="Datatypes" comment="com.pi4j.context.Context&#10;&#10;Object used to communicate with the Pi4J API" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="usNbXCFOXZUb1" name="DigitalInput" namespace="Datatypes" comment="com.pi4j.io.gpio.digital.DigitalInput" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="u5nM17OoHAYAD" name="DigitalInputConfigBuilder" namespace="Datatypes" comment="com.pi4j.io.gpio.digital.DigitalInputConfigBuilder" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uCq1m7a90gZNi" name="DigitalOutput" namespace="Datatypes" comment="com.pi4j.io.gpio.digital.DigitalOutput" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uRF3RL0m1NpOT" name="DigitalOutputConfigBuilder" namespace="Datatypes" comment="com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uRCMbedZ3mPMC" name="DigitalState" namespace="Datatypes" comment="com.pi4j.io.gpio.digital.DigitalState" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="us7jxaKqWQIiW" name="PullResistance" namespace="Datatypes" comment="com.pi4j.io.gpio.digital.PullResistance" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uBZORGednrbEx" name="Pwm" namespace="Datatypes" comment="com.pi4j.iw.pwm.Pwm" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uCQrUPJPYCHCA" name="PwmConfigBuilder" namespace="Datatypes" comment="com.pi4j.io.pwm.PwmConfigBuilder" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="us3YZuRYzuxXn" name="PwmType" namespace="Datatypes" comment="com.pi4j.io.pwm.PwmType" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uBc3DEKv6xL0v" name="OpenCVFrameConverter.ToMat" namespace="Datatypes" comment="org.bytedeco.javacv.OpenCVFrameConverter.ToMat" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uSkySfC1PVbzu" name="Mat" namespace="Datatypes" comment="org.bytedeco.opencv.opencv_core.Mat" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uoaNTbxbl0bgu" name="FrameGrabber" namespace="Datatypes" comment="org.bytedeco.javacv.FrameGrabber&#10;&#10;An OpenCV-compatible camera object." visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uklvsQ2cKFH2p" name="Frame" namespace="Datatypes" comment="org.bytedeco.javacv.Frame" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uyHtw5cv74GVA" name="CanvasFrame" namespace="Datatypes" comment="org.bytedeco.javacv.CanvasFrame" visibility="public"/>
<UML:DataType isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uFSRjsniasjt3" name="IplImage" namespace="Datatypes" comment="org.bytedeco.opencv.opencv_core.IplImage" visibility="public"/>
</UML:Namespace.ownedElement>
</UML:Package>
<UML:Enumeration isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uvGD5ESq5Z2AT" name="ConfigProperties" namespace="Logical_View" comment="Enum of possible config properties.&#10;&#10;Due to limitations in Umbrello, each literal only shows their default values. Each literal also contains a human-readable name (retrievable by property.toString() ), or a config-readable name (retrievable by property.getConfig() ). These values are denoted in each literal's documentation. Retrieving the literal's default value is done by calling property.getDefaultValue()" visibility="public" stereotype="enum">
<UML:Enumeration.literal>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="upEXxh4kZ64bG" name="CROP_X" namespace="uvGD5ESq5Z2AT" comment="X Coordinate of the top-left coordinate for the newly cropped image&#10;&#10;Human readable name: &quot;Crop X&quot;&#10;Config readable name: &quot;cropX&quot;" visibility="public" value="275"/>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="ufgfO1E5oazjm" name="CROP_Y" namespace="uvGD5ESq5Z2AT" comment="Y Coordinate of the top-left coordinate for the newly cropped image&#10;&#10;Human readable name: &quot;Crop Y&quot;&#10;Config readable name: &quot;cropY&quot;" visibility="public" value="205"/>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="ulLxfiM6RAmzB" name="CROP_W" namespace="uvGD5ESq5Z2AT" comment="Width of the newly cropped image&#10;&#10;Human readable name: &quot;Crop Width&quot;&#10;Config readable name: &quot;cropW&quot;" visibility="public" value="80"/>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="u9sxfmSblIz21" name="CROP_H" namespace="uvGD5ESq5Z2AT" comment="Height of the newly cropped image&#10;&#10;Human readable name: &quot;Crop Height&quot;&#10;Config readable name: &quot;cropH&quot;" visibility="public" value="50"/>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uMcIY87FH1xZg" name="THRESHOLD" namespace="uvGD5ESq5Z2AT" comment="pseudo-boolean to toggle whether an image should be thresholded during processing. Any value of this property that is not 0 will be considered TRUE, and the value 0 will be considered FALSE.&#10;&#10;Human-readable name: &quot;Toggle threshold&quot;&#10;Config-readable name: &quot;threshold&quot;" visibility="public" value="1"/>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="u2Fq8pGFKdO5a" name="CROP" namespace="uvGD5ESq5Z2AT" comment="pseudo-boolean to toggle whether an image should be cropped during processing. Any value of this property that is not 0 will be considered TRUE, and the value 0 will be considered FALSE.&#10;&#10;Human-readable name: &quot;Toggle crop&quot;&#10;Config-readable name: &quot;crop&quot;" visibility="public" value="1"/>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uOVDuobBco19d" name="COMPOSITE_FRAMES" namespace="uvGD5ESq5Z2AT" comment="The number of frames to composite together (using boolean ANDing) while processing this camera's images.&#10;&#10;Human-readable name: &quot;Composite frame count&quot;&#10;Config-readable name: &quot;compositeCount&quot;" visibility="public" value="5"/>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="uJgdnxP77NbVp" name="PRIME" namespace="uvGD5ESq5Z2AT" comment="Whether or not to prime the device under this camera, when under test.&#10;&#10;Human-readable name: &quot;Prime device?&quot;&#10;Config-readable name: &quot;prime&quot;" visibility="public" value="0"/>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="u2Zsi3jrcmEJ6" name="THRESHOLD_VALUE" namespace="uvGD5ESq5Z2AT" comment="Defines the cutoff point of the binary threshold.&#10;&#10;Human-readable name: &quot;Threshold Value&quot;&#10;Config-readable name: &quot;thresholdValue&quot;" visibility="public" value="45"/>
<UML:EnumerationLiteral isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="umnsHXvMMFdeY" name="ACTIVE" namespace="uvGD5ESq5Z2AT" comment="Whether a camera should be used for the main test running.&#10;&#10;Human-readable name: &quot;Camera active?&quot;&#10;Config-readable name: &quot;active&quot;" visibility="public" value="1"/>
</UML:Enumeration.literal>
</UML:Enumeration>
</UML:Namespace.ownedElement>
<XMI.extension xmi.extender="umbrello">
<diagrams resolution="96">
<diagram xmi.id="uBO7PBkqnRCqe" name="class diagram" type="1" documentation="" backgroundcolor="#ffffff" fillcolor="#ffffc0" font="Noto Sans,10,-1,5,50,0,0,0,0,0,Regular" griddotcolor="#d3d3d3" linecolor="#990000" linewidth="0" textcolor="#000000" usefillcolor="1" showattribassocs="1" showatts="1" showattsig="1" showops="1" showopsig="1" showpackage="1" showpubliconly="0" showscope="1" showstereotype="2" localid="-1" showgrid="0" snapgrid="0" snapcsgrid="0" snapx="25" snapy="25" zoom="100" canvasheight="216" canvaswidth="160" isopen="1">
<widgets>
<enumwidget xmi.id="uvGD5ESq5Z2AT" localid="ukq9avhYimobQ" textcolor="#000000" linecolor="#990000" linewidth="0" usefillcolor="1" usesdiagramfillcolor="0" usesdiagramusefillcolor="0" fillcolor="#ffffc0" font="Noto Sans,10,-1,5,50,0,0,0,0,0,Regular" autoresize="1" x="-18" y="-66" width="160" height="216" isinstance="0" showstereotype="2" showpackage="1"/>
</widgets>
<messages/>
<associations/>
</diagram>
</diagrams>
</XMI.extension>
</UML:Model>
<UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="Use_Case_View" name="Use Case View" namespace="m1" visibility="public">
<UML:Namespace.ownedElement/>
</UML:Model>
<UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="Component_View" name="Component View" namespace="m1" visibility="public">
<UML:Namespace.ownedElement/>
</UML:Model>
<UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="Deployment_View" name="Deployment View" namespace="m1" visibility="public">
<UML:Namespace.ownedElement/>
</UML:Model>
<UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" xmi.id="Entity_Relationship_Model" name="Entity Relationship Model" namespace="m1" visibility="public">
<UML:Namespace.ownedElement/>
</UML:Model>
</UML:Namespace.ownedElement>
</UML:Model>
</XMI.content>
<XMI.extensions xmi.extender="umbrello">
<docsettings viewid="uBO7PBkqnRCqe" documentation="" uniqueid="uFSRjsniasjt3"/>
<listview>
<listitem id="Views" type="800" open="1">
<listitem id="Component_View" type="821" open="1"/>
<listitem id="Deployment_View" type="827" open="1"/>
<listitem id="Entity_Relationship_Model" type="836" open="1"/>
<listitem id="Logical_View" type="801" open="1">
<listitem id="uBO7PBkqnRCqe" type="807" label="class diagram" open="0"/>
<listitem id="uvGD5ESq5Z2AT" type="831" open="0">
<listitem id="umnsHXvMMFdeY" type="839" open="0"/>
<listitem id="uOVDuobBco19d" type="839" open="0"/>
<listitem id="u2Fq8pGFKdO5a" type="839" open="0"/>
<listitem id="u9sxfmSblIz21" type="839" open="0"/>
<listitem id="ulLxfiM6RAmzB" type="839" open="0"/>
<listitem id="upEXxh4kZ64bG" type="839" open="0"/>
<listitem id="ufgfO1E5oazjm" type="839" open="0"/>
<listitem id="uJgdnxP77NbVp" type="839" open="0"/>
<listitem id="uMcIY87FH1xZg" type="839" open="0"/>
<listitem id="u2Zsi3jrcmEJ6" type="839" open="0"/>
</listitem>
<listitem id="Datatypes" type="830" open="1">
<listitem id="uPmQePzXPYBFw" type="829" open="0"/>
<listitem id="uTOcOSNHuXJyP" type="829" open="1"/>
<listitem id="uyHtw5cv74GVA" type="829" open="1"/>
<listitem id="uIR2BbP8pwas8" type="829" open="1"/>
<listitem id="uUqvKBDseGBT8" type="829" open="0"/>
<listitem id="ur90bbehes6KP" type="829" open="1"/>
<listitem id="uaMTlVo6ZPlbv" type="829" open="1"/>
<listitem id="usNbXCFOXZUb1" type="829" open="1"/>
<listitem id="u5nM17OoHAYAD" type="829" open="1"/>
<listitem id="uCq1m7a90gZNi" type="829" open="1"/>
<listitem id="uRF3RL0m1NpOT" type="829" open="1"/>
<listitem id="uRCMbedZ3mPMC" type="829" open="1"/>
<listitem id="uGEdyb7rYtJbR" type="829" open="0"/>
<listitem id="utYklzpE90p78" type="829" open="1"/>
<listitem id="uQZkGcvvHmpdc" type="829" open="1"/>
<listitem id="uaL98Rm7EKgtM" type="829" open="1"/>
<listitem id="uVQA5vV2PfHS8" type="829" open="0"/>
<listitem id="uklvsQ2cKFH2p" type="829" open="1"/>
<listitem id="uoaNTbxbl0bgu" type="829" open="1"/>
<listitem id="uGrxjnu3NdGkS" type="829" open="0"/>
<listitem id="uFSRjsniasjt3" type="829" open="1"/>
<listitem id="uPLfPTeiCHApE" type="829" open="1"/>
<listitem id="uVQDGnttxJGvw" type="829" open="1"/>
<listitem id="uFtz80V1i6e6W" type="829" open="0"/>
<listitem id="uup0uQtaupJA2" type="829" open="0"/>
<listitem id="uhxf4utUB9yw9" type="829" open="1"/>
<listitem id="uSkySfC1PVbzu" type="829" open="1"/>
<listitem id="uBc3DEKv6xL0v" type="829" open="1"/>
<listitem id="uBFg3i6c9CmfL" type="829" open="1"/>
<listitem id="uzX3hHbj5KewD" type="829" open="1"/>
<listitem id="us7jxaKqWQIiW" type="829" open="1"/>
<listitem id="uBZORGednrbEx" type="829" open="1"/>
<listitem id="uCQrUPJPYCHCA" type="829" open="1"/>
<listitem id="us3YZuRYzuxXn" type="829" open="1"/>
<listitem id="uwIkaSubmJlRi" type="829" open="1"/>
<listitem id="uip7MVxfAQJ07" type="829" open="1"/>
<listitem id="ut2HhRXRKmg9Q" type="829" open="1"/>
<listitem id="ux7SnrmHLMP8A" type="829" open="0"/>
<listitem id="uOsZBNUExO74y" type="829" open="0"/>
<listitem id="uNj6ThaQPbIRF" type="829" open="0"/>
<listitem id="uTyQLcjDfE5al" type="829" open="0"/>
<listitem id="ueY965tY2Anss" type="829" open="0"/>
<listitem id="ugB3shC3HW3bt" type="829" open="0"/>
<listitem id="uFrDHAwcuLu0K" type="829" open="0"/>
<listitem id="u2ffQSb9S8oCt" type="829" open="0"/>
<listitem id="uVD8KLYSNJr6R" type="829" open="0"/>
<listitem id="uOP09e19M6XCK" type="829" open="0"/>
<listitem id="utoLI0CURUNlO" type="829" open="0"/>
<listitem id="uzOpHYFIPuTBE" type="829" open="1"/>
<listitem id="uVULczmLK2Ekp" type="829" open="1"/>
</listitem>
</listitem>
<listitem id="Use_Case_View" type="802" open="1"/>
</listitem>
</listview>
<codegeneration>
<codegenerator language="C++"/>
</codegeneration>
</XMI.extensions>
</XMI>

View file

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.baxter.disco</groupId>
<artifactId>ocr</artifactId>
<version>4.3.0</version>
<version>4.3.1</version>
<packaging>jar</packaging>
<name>Disco OCR Accuracy Over Life Testing</name>
<description>Testing Discos for long-term accuracy, using automated optical character recognition.</description>

View file

@ -18,14 +18,14 @@ import java.util.concurrent.locks.ReentrantLock;
* classes).
*
* @author Blizzard Finnegan
* @version 1.5.0, 10 Feb. 2023
* @version 1.6.0, 10 Feb. 2023
*/
public class Cli
{
/**
* Complete build version number
*/
private static final String version = "4.3.0";
private static final String version = "4.3.1";
/**
* Currently saved iteration count.
@ -777,6 +777,16 @@ public class Cli
while(!LOCK.tryLock()) {}
DataSaving.writeValues(i,resultMap,cameraToFile);
LOCK.unlock();
//LO detection and avoidance
for(Double result : resultMap.values())
{
if(result <= 1.0 || result >= 117.0)
{
fixture.goUp();
try{ Thread.sleep(20000); } catch(Exception e){ ErrorLogging.logError(e); }
}
}
//Clear the result map
//DO NOT CLEAR camera to file Map. This will change the order of the objects within it
resultMap.clear();

View file

@ -1,7 +1,9 @@
package org.baxter.disco.ocr;
//Standard imports
import java.util.concurrent.locks.Lock;
//Pi4J imports
import com.pi4j.Pi4J;
import com.pi4j.context.Context;
import com.pi4j.io.gpio.digital.DigitalInput;
@ -472,7 +474,7 @@ public class MovementFacade
if(runSwitchThread.isAlive())
{
exit = true;
try{ Thread.sleep(100); } catch(Exception e){}
try{ Thread.sleep(500); } catch(Exception e){}
}
pi4j.shutdown();
}
@ -502,8 +504,9 @@ public class MovementFacade
public void iterationMovement(boolean prime)
{
goUp();
if(prime) pressButton();
//if(prime) pressButton();
goDown();
try{ Thread.sleep(100); } catch(Exception e){ ErrorLogging.logError(e); }
pressButton();
}
}

View file

@ -1,8 +1,6 @@
package org.baxter.disco.ocr;
import java.util.Map;
import java.util.Set;
//Static imports for OpenCV
import static org.bytedeco.opencv.global.opencv_imgproc.CV_BGR2GRAY;
import static org.bytedeco.opencv.global.opencv_imgproc.THRESH_BINARY;
import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor;
@ -12,15 +10,21 @@ import static org.bytedeco.opencv.global.opencv_imgcodecs.cvSaveImage;
import static org.bytedeco.opencv.global.opencv_highgui.selectROI;
import static org.bytedeco.opencv.global.opencv_core.bitwise_and;
//JavaCV imports
import org.bytedeco.javacv.Frame;
import org.bytedeco.javacv.CanvasFrame;
import org.bytedeco.javacv.FrameGrabber;
import org.bytedeco.javacv.OpenCVFrameGrabber;
import org.bytedeco.javacv.OpenCVFrameConverter;
//OpenCV imports
import org.bytedeco.opencv.opencv_core.Mat;
import org.bytedeco.opencv.opencv_core.IplImage;
import org.bytedeco.opencv.opencv_core.Rect;
//Standard imports
import java.util.Map;
import java.util.Set;
import java.io.File;
import java.time.LocalDateTime;
import java.util.ArrayList;
@ -33,7 +37,7 @@ import java.util.List;
* Performs image capture, as well as image manipulation.
*
* @author Blizzard Finnegan
* @version 2.0.0, 15 Feb. 2023
* @version 2.0.1, 15 Feb. 2023
*/
public class OpenCVFacade
{
@ -422,11 +426,11 @@ public class OpenCVFacade
List<Mat> imageList = takeBurst(cameraName, compositeFrames);
//Debug save of pre-processing image
String fileLocation = ConfigFacade.getImgSaveLocation() + "/debug/"
+ ErrorLogging.fileDatetime.format(LocalDateTime.now()) +
"." + cameraName + "-preProcess.jpg";
cvSaveImage(fileLocation,MAT_CONVERTER.convertToIplImage(
MAT_CONVERTER.convert(imageList.get(0))));
//String fileLocation = ConfigFacade.getImgSaveLocation() + "/debug/"
// + ErrorLogging.fileDatetime.format(LocalDateTime.now()) +
// "." + cameraName + "-preProcess.jpg";
//cvSaveImage(fileLocation,MAT_CONVERTER.convertToIplImage(
// MAT_CONVERTER.convert(imageList.get(0))));
ErrorLogging.logError("DEBUG: Size of output image list: " + imageList.size());
Mat finalImage = compose(imageList, threshold, crop, cameraName);

View file

@ -1,10 +1,16 @@
package org.baxter.disco.ocr;
//Standard imports
import java.io.File;
import java.util.Scanner;
import org.bytedeco.leptonica.PIX;
//Static import of image reader
import static org.bytedeco.leptonica.global.leptonica.pixRead;
//Import Tesseract-capable image class
import org.bytedeco.leptonica.PIX;
//Import Tesseract API
import org.bytedeco.tesseract.TessBaseAPI;
/**