Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Slider0007 committed Oct 7, 2024
1 parent 14b5209 commit 2f26785
Showing 1 changed file with 37 additions and 31 deletions.
68 changes: 37 additions & 31 deletions sd-card/html/edit_sequence.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,36 +103,32 @@ <h2>Number Sequences</h2>
<a href=https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/ target=_blank>ROI Configuration</a>
</summary>
<p>
<b>R</b>egion <b>O</b>f <b>I</b>nterest (ROI) for digit numbers can be defined on this page. If no digit number
needs to be processed, disable digit number processing by deselecting <b>"Digit ROI Processing"</b>.
This page is dedicated to defining number sequences. Each number sequence consists of digital ROIs and/or analog
ROIs that are processed together. After defining the number sequence, you need to specify the corresponding digit
and/or analog <b>R</b>egion <b>O</b>f <b>I</b>nterest (ROI). These ROIs are processed by the algorithm to digitize
the content.<br>
By default, one number sequence ("main") is already predefined and selected in the <b>Number Sequence</b> dropdown.
If additional number sequences are required, they can be added using the buttons next to the dropdown.
</p>
<p>
By default one number sequence (a number seqence contains of digit ROIs and/or analog counter ROIs which are
processed together) is predefined and already selected in the drop down <b>"Number Sequence"</b>. If more than
one number sequence is needed additional one's can be added with the buttons next to the drop down. Each number
sequence will be processed separately.
The ROI type can be switched using the <b>Digit ROI / Analog ROI</b> selection box. Individual ROIs in the selected
number sequence can be toggled using the selection box next to the ROI type selector.<br>
To create new ROIs, click <b>New</b>. The new ROI will automatically be assigned a unique name in ascending order
based on the type selected (dig1, dig2, ... / ana1, ana2, ...). Deleting an ROI from the existing ones will
rename the remaining ROIs in ascending order, without leaving any gaps.<br>

ROIs can be positioned either by dragging and dropping with the mouse or by manually entering parameters into the
designated fields. For accurate ROI placement and sizing, please consult the documentation thoroughly, as precise
configurations are essential for reliable processing:
<a href=https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/ target=_blank>ROI Configuration</a>.<br>
The order of the ROIs determines their position (and thus the multiplication factor) within the number sequence.
The position in the sequence can be changed using the <b>Move Lower</b> and <b>Move Higher</b> buttons. Below
the selection boxes, the resulting multiplication factors are displayed: one based solely on the position/order
in the number sequence, and another adjusted by the decimal shift setting (Parameter: Decimal Shift, default: 0).
</p>
<p>
Using drag and drop by mouse of by manually entering the parameters into the given fields the digit ROIs can be
positined to the digit numbers on the reference image. To have proper ROI placement and sizes please check the
documentation in detail because it's very important to be really precise to have reliable processing:
<a href=https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/ target=_blank>ROI Configuration</a>.
With the drop down <b>"ROI"</b> the different ROIs in the respective number sequence can be selected.<br>

To create new ROIs use <b>"New ROI"</b>. The new ROIs are automatically named uniquely and in ascending order
(e.g. dig1, dig2, ...). Deleting a ROI between exisitung ones will rename the remaining ROIs in ascending order
without keeping any naming gap.
</p>
<p>
The order of the ROI defines the position (and therefore the multiplication factor) within the number sequence.
The position in the number sequence can be changed with the buttons <b>"Move Lower"</b> and <b>"Move Higher"</b>.
The multiplication factor which is shown below the ROI drop down is the multiplication factor of pure position/order
in number sequence and the factor right-hand side to this is the additionally corrected by decimal shift setting
(expert parameter: Decimal Shift, default: 0).
</p>
<p>
After the definition of digit ROIs is completed don't forget to save the new configuration with the button
<b>"Save And Apply"</b>. The new configuration gets automatically applied. No reboot is required.
Once the sequences and ROIs are defined, don't forget to save the new configuration by clicking the <b>Save And Apply</b>
button. The new configuration will be applied automatically, and no reboot is required.
</p>
</details>
<hr>
Expand Down Expand Up @@ -348,6 +344,7 @@ <h2>Number Sequences</h2>

RefreshROI();
parseROIArrangement();
onTypeChanged();
}


Expand Down Expand Up @@ -376,6 +373,7 @@ <h2>Number Sequences</h2>

RefreshROI();
parseROIArrangement();
onTypeChanged();
}


Expand Down Expand Up @@ -587,9 +585,14 @@ <h2>Number Sequences</h2>
{
for (i = 0; i < jsonConfigModifiedDelta[type]["sequence"].length; ++i) {
if (jsonConfigModifiedDelta[type]["sequence"][i]["sequencename"] == sequenceName) {
jsonConfigModifiedDelta[type]["sequence"][i]["roi"].push({"x": parseInt(x),
"y": parseInt(y), "dx": parseInt(dx), "dy": parseInt(dy), "ccw": false, "ar": dx/dy});

if (typeSelection.value == "digit") {
jsonConfigModifiedDelta[type]["sequence"][i]["roi"].push({"x": parseInt(x),
"y": parseInt(y), "dx": parseInt(dx), "dy": parseInt(dy), "ar": dx/dy});
}
else if (typeSelection.value == "analog") {
jsonConfigModifiedDelta[type]["sequence"][i]["roi"].push({"x": parseInt(x),
"y": parseInt(y), "dx": parseInt(dx), "dy": parseInt(dy), "ccw": false, "ar": dx/dy});
}
return "";
}
}
Expand Down Expand Up @@ -993,8 +996,6 @@ <h2>Number Sequences</h2>
document.getElementById("lockSizesDigit").checked = lockSizeDigit;
document.getElementById("lockSizesAnalog").checked = lockSizeAnalog;

document.getElementById("CCW").checked = jsonConfigModifiedDelta.analog.sequence[sequenceSelection.selectedIndex].roi[roiSelected].ccw;

document.getElementById("lockSpaceEquidistant").checked = lockSpaceEquidistant;
document.getElementById("space").disabled = !lockSpaceEquidistant;
document.getElementById("space").value = space;
Expand All @@ -1003,6 +1004,11 @@ <h2>Number Sequences</h2>
rect.startY = document.getElementById("refy").value = jsonConfigModifiedDelta[typeSelection.value].sequence[sequenceSelection.selectedIndex].roi[roiSelected].y;
rect.w = document.getElementById("refdx").value = jsonConfigModifiedDelta[typeSelection.value].sequence[sequenceSelection.selectedIndex].roi[roiSelected].dx;
rect.h = document.getElementById("refdy").value = jsonConfigModifiedDelta[typeSelection.value].sequence[sequenceSelection.selectedIndex].roi[roiSelected].dy;

if (typeSelection.value == "analog") {
document.getElementById("CCW").checked = jsonConfigModifiedDelta.analog.sequence[sequenceSelection.selectedIndex].roi[roiSelected].ccw;
}

RefreshDraw();
}

Expand Down

0 comments on commit 2f26785

Please sign in to comment.