现场备份

This commit is contained in:
2024-06-05 11:49:56 +08:00
parent 3529db0321
commit be4e182aff
19 changed files with 19 additions and 18 deletions
@@ -275,15 +275,15 @@ void test()
}
CorrectionPoints oldPoints;
double originX = -125, originY = -450, originZ = -202;
double originRx = -0.228863, originRy = 0.142551, originRz = -0.676582;
double originX = -125.3, originY = -450.4, originZ = -233.8;
double originRx = -0.278863, originRy = 0.142551, originRz = -0.676582;
//-726.5 -1104.1 -33989.4 -24.6389 14.1795 -0.660849
void createModbusStrs(const int startPos,double& Value, std::shared_ptr <detData> data)
{
data->writeBack("short", startPos, QString::number(Value < 0 ? 2 : 1));
data->writeBack("short", startPos + 1, QString::number(abs(static_cast<int>(Value))));
double pvalue = Value - static_cast<int>(Value);
data->writeBack("short", startPos + 2, QString::number(abs(pvalue * 100)));
data->writeBack("short", startPos + 2, QString::number(static_cast<int>(abs(pvalue * 100))));
}
void ALGO_Correction(std::shared_ptr <detData> data)
@@ -308,7 +308,8 @@ void ALGO_Correction(std::shared_ptr <detData> data)
double offsetRz = originRz - point.z;
//Point3d RPYResult = getRPYOffset(oldPoints, resultPoints);
//Point3d oriResult = getOriginPointOffset(oldPoints, resultPoints);
std::cout << "offsetX:" << offsetX << "offsetY:" << offsetY << "offsetZ:" << offsetZ << std::endl;
std::cout << "offsetRx:" << offsetRx << "offsetRy:" << offsetRy << "offsetRz:" << offsetRz << std::endl;
//int pValueBounus = 100;
createModbusStrs(310, offsetX,data);
createModbusStrs(313, offsetY, data);
+1 -1
View File
@@ -18,7 +18,7 @@
#define sColor_BlackWithWhite "45, 45, 45"
#define enableHandleAiModel 1
#define disableBackEndCheck 1
#define disableBackEndCheck 0
//窗口设置
#define windowMoveFreshRate 100//窗口移动每秒的刷新率
@@ -1593,20 +1593,20 @@ void Pings_Inspection_2_Front (HObject ho_in_Image, HTuple hv_in_ShapePath, HTup
{
////定位
//
//Pings_ROI_Rec2(ho_in_Image, hv_in_ShapePath, hv_in_Parameter, &hvec_out_ROI_Row,
// &hvec_out_ROI_Col, &(*hv_out_Flag));
// HTuple ExpTmpOutVar_0;HTuple ExpTmpOutVar_1;
int x = 3244.74084, y = 1928.88794, w = 503.440155, h = 566.725;
HTuple rows, cols;
cols.Append(x-w); rows.Append(y-h);
cols.Append(x+w); rows.Append(y-h);
cols.Append(x+w); rows.Append(y+h);
cols.Append(x-w); rows.Append(y+h);
hvec_out_ROI_Row[0].T() = rows;
hvec_out_ROI_Col[0].T() = cols;
Pings_ROI_Rec2(ho_in_Image, hv_in_ShapePath, hv_in_Parameter, &hvec_out_ROI_Row,
&hvec_out_ROI_Col, &(*hv_out_Flag));
//HTuple ExpTmpOutVar_0;HTuple ExpTmpOutVar_1;
// int x = 3244.74084, y = 1928.88794, w = 503.440155, h = 566.725;
// HTuple rows, cols;
// cols.Append(x-w); rows.Append(y-h);
// cols.Append(x+w); rows.Append(y-h);
// cols.Append(x+w); rows.Append(y+h);
// cols.Append(x-w); rows.Append(y+h);
// hvec_out_ROI_Row[0].T() = rows;
// hvec_out_ROI_Col[0].T() = cols;
hvec_out_ROI_Row[1].T() = rows;
hvec_out_ROI_Col[1].T() = cols;
// hvec_out_ROI_Row[1].T() = rows;
// hvec_out_ROI_Col[1].T() = cols;
//等分
hv_Num = (HTuple(hvec_out_ROI_Row.Length()).TupleInt())-1;
{
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.