29 lines
842 B
C++
29 lines
842 B
C++
#ifndef DETECTIONOUTPUTCONVERTER_H
|
|
#define DETECTIONOUTPUTCONVERTER_H
|
|
|
|
#include "IVrConfig.h"
|
|
#include "IYTireHolePoseStatus.h"
|
|
#include <QJsonObject>
|
|
|
|
class DetectionOutputConverter
|
|
{
|
|
public:
|
|
// 轮胎孔检测结果转换
|
|
static ProtocolDetectionOutput ConvertTireHoleResult(
|
|
const std::vector<TireHoleInfo>& tireHoleInfoList,
|
|
bool success,
|
|
int errorCode,
|
|
const QString& message,
|
|
int cameraIndex);
|
|
|
|
// JSON 序列化
|
|
static QJsonObject TireHoleOutputToJson(const TireHoleDetectOutput& output);
|
|
static QJsonObject ToJson(const ProtocolDetectionOutput& output);
|
|
|
|
// 从法向量计算欧拉角
|
|
static void NormalDirToEuler(double nx, double ny, double nz,
|
|
double& roll, double& pitch, double& yaw);
|
|
};
|
|
|
|
#endif // DETECTIONOUTPUTCONVERTER_H
|