Skip to content

Commit

Permalink
Face detection resolution and Quality control quality improvements (#109
Browse files Browse the repository at this point in the history
)

* Update UI to allow face detection enabling for CIF mode
Unexpected consequence of the changes addressed in #98 
* Changed the UI labelling for the 'quality' slider to just say 'High (slow)' and 'Low (fast)', much more comprehensible, thanks @TungstenE2
I also allow the slider to go to '6' instead of '10' for the OV2640
  • Loading branch information
easytarget authored May 11, 2021
1 parent f97d56e commit 5f6bb1d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion index_other.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const uint8_t index_simple_html[] = R"=====(<!doctype html>
framesize.onchange = () => {
updateConfig(framesize)
if (framesize.value > 5) {
if (framesize.value > 6) {
updateValue(detect, false)
updateValue(recognize, false)
}
Expand Down
12 changes: 6 additions & 6 deletions index_ov2640.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ const uint8_t index_ov2640_html[] = R"=====(<!doctype html>
</div>
<div class="input-group" id="quality-group">
<label for="quality">Quality</label>
<div class="range-min">63</div>
<div class="range-min">Low<br><span style="font-size: 80%;">(fast)</span></div>
<!-- Note; the following element is 'flipped' in CSS so that it slides from High to Low
As a result the 'min' and 'max' values are reversed here too -->
<input type="range" id="quality" min="10" max="63" value="10" class="default-action" title="Lower is Better">
<div class="range-max">10</div>
<input type="range" id="quality" min="6" max="63" value="10" class="default-action">
<div class="range-max">High<br><span style="font-size: 80%;">(slow)</span></div>
</div>
<div class="input-group" id="brightness-group">
<label for="brightness">Brightness</label>
Expand Down Expand Up @@ -572,14 +572,14 @@ const uint8_t index_ov2640_html[] = R"=====(<!doctype html>

framesize.onchange = () => {
updateConfig(framesize)
if (framesize.value > 5) {
if (framesize.value > 6) {
updateValue(detect, false)
updateValue(recognize, false)
}
}

detect.onchange = () => {
if (framesize.value > 5) {
if (framesize.value > 6) {
alert("Please select CIF or lower resolution before enabling this feature!");
updateValue(detect, false)
return;
Expand All @@ -592,7 +592,7 @@ const uint8_t index_ov2640_html[] = R"=====(<!doctype html>
}

recognize.onchange = () => {
if (framesize.value > 5) {
if (framesize.value > 6) {
alert("Please select CIF or lower resolution before enabling this feature!");
updateValue(recognize, false)
return;
Expand Down
10 changes: 5 additions & 5 deletions index_ov3660.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ const uint8_t index_ov3660_html[] = R"=====(<!doctype html>
</div>
<div class="input-group" id="quality-group">
<label for="quality">Quality</label>
<div class="range-min">63</div>
<div class="range-min">Low<br><span style="font-size: 80%;">(fast)</span></div>
<!-- Note; the following element is 'flipped' in CSS so that it slides from High to Low
As a result the 'min' and 'max' values are reversed here too -->
<input type="range" id="quality" min="4" max="63" value="10" class="default-action">
<div class="range-max">4</div>
<div class="range-max">High<br><span style="font-size: 80%;">(slow)</span></div>
</div>
<div class="input-group" id="brightness-group">
<label for="brightness">Brightness</label>
Expand Down Expand Up @@ -580,14 +580,14 @@ const uint8_t index_ov3660_html[] = R"=====(<!doctype html>

framesize.onchange = () => {
updateConfig(framesize)
if (framesize.value > 5) {
if (framesize.value > 6) {
updateValue(detect, false)
updateValue(recognize, false)
}
}

detect.onchange = () => {
if (framesize.value > 5) {
if (framesize.value > 6) {
alert("Please select CIF or lower resolution before enabling this feature!");
updateValue(detect, false)
return;
Expand All @@ -600,7 +600,7 @@ const uint8_t index_ov3660_html[] = R"=====(<!doctype html>
}

recognize.onchange = () => {
if (framesize.value > 5) {
if (framesize.value > 6) {
alert("Please select CIF or lower resolution before enabling this feature!");
updateValue(recognize, false)
return;
Expand Down

0 comments on commit 5f6bb1d

Please sign in to comment.