mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-09 21:17:06 +03:00
Option alignment algo off (#1924)
* Update edit_config_param.html * Update ClassFlowAlignment.cpp
This commit is contained in:
@@ -65,7 +65,7 @@ bool ClassFlowAlignment::ReadParameter(FILE* pfile, string& aktparamgraph)
|
|||||||
std::vector<string> splitted;
|
std::vector<string> splitted;
|
||||||
int suchex = 40;
|
int suchex = 40;
|
||||||
int suchey = 40;
|
int suchey = 40;
|
||||||
int alg_algo = 0;
|
int alg_algo = 0; //default=0; 1 =HIGHACCURACY; 2= FAST; 3= OFF //add disable aligment algo |01.2023
|
||||||
|
|
||||||
|
|
||||||
aktparamgraph = trim(aktparamgraph);
|
aktparamgraph = trim(aktparamgraph);
|
||||||
@@ -130,6 +130,8 @@ bool ClassFlowAlignment::ReadParameter(FILE* pfile, string& aktparamgraph)
|
|||||||
alg_algo = 1;
|
alg_algo = 1;
|
||||||
if (toUpper(splitted[1]) == "FAST")
|
if (toUpper(splitted[1]) == "FAST")
|
||||||
alg_algo = 2;
|
alg_algo = 2;
|
||||||
|
if (toUpper(splitted[1]) == "OFF") //no align algo if set to 3 = off => no draw ref //add disable aligment algo |01.2023
|
||||||
|
alg_algo = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +147,10 @@ bool ClassFlowAlignment::ReadParameter(FILE* pfile, string& aktparamgraph)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadReferenceAlignmentValues();
|
//no align algo if set to 3 = off => no draw ref //add disable aligment algo |01.2023
|
||||||
|
if(References[0].alignment_algo != 3){
|
||||||
|
LoadReferenceAlignmentValues();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -230,14 +235,22 @@ bool ClassFlowAlignment::doFlow(string time)
|
|||||||
AlignAndCutImage->SaveToFile(FormatFileName("/sdcard/img_tmp/rot.jpg"));
|
AlignAndCutImage->SaveToFile(FormatFileName("/sdcard/img_tmp/rot.jpg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AlignAndCutImage->Align(&References[0], &References[1]))
|
|
||||||
{
|
//no align algo if set to 3 = off //add disable aligment algo |01.2023
|
||||||
SaveReferenceAlignmentValues();
|
if(References[0].alignment_algo != 3){
|
||||||
}
|
if (!AlignAndCutImage->Align(&References[0], &References[1]))
|
||||||
|
{
|
||||||
|
SaveReferenceAlignmentValues();
|
||||||
|
}
|
||||||
|
}// no align
|
||||||
|
|
||||||
|
|
||||||
#ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
|
#ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
|
||||||
if (AlgROI) {
|
if (AlgROI) {
|
||||||
DrawRef(ImageTMP);
|
//no align algo if set to 3 = off => no draw ref //add disable aligment algo |01.2023
|
||||||
|
if(References[0].alignment_algo != 3){
|
||||||
|
DrawRef(ImageTMP);
|
||||||
|
}
|
||||||
tfliteflow.DigitalDrawROI(ImageTMP);
|
tfliteflow.DigitalDrawROI(ImageTMP);
|
||||||
tfliteflow.AnalogDrawROI(ImageTMP);
|
tfliteflow.AnalogDrawROI(ImageTMP);
|
||||||
ImageTMP->writeToMemoryAsJPG((ImageData*)AlgROI, 90);
|
ImageTMP->writeToMemoryAsJPG((ImageData*)AlgROI, 90);
|
||||||
@@ -261,7 +274,10 @@ bool ClassFlowAlignment::doFlow(string time)
|
|||||||
delete ImageTMP;
|
delete ImageTMP;
|
||||||
ImageTMP = NULL;
|
ImageTMP = NULL;
|
||||||
|
|
||||||
LoadReferenceAlignmentValues();
|
//no align algo if set to 3 = off => no draw ref //add disable aligment algo |01.2023
|
||||||
|
if(References[0].alignment_algo != 3){
|
||||||
|
LoadReferenceAlignmentValues();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,6 +282,7 @@ textarea {
|
|||||||
<option value="default" selected>Default</option>
|
<option value="default" selected>Default</option>
|
||||||
<option value="highAccuracy" >HighAccuracy</option>
|
<option value="highAccuracy" >HighAccuracy</option>
|
||||||
<option value="fast" >Fast</option>
|
<option value="fast" >Fast</option>
|
||||||
|
<option value="off" >Off</option><!-- add disable aligment algo |01.2023 -->
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td style="font-size: 80%;">
|
<td style="font-size: 80%;">
|
||||||
|
|||||||
Reference in New Issue
Block a user