|
|
|
|
@ -69,10 +69,11 @@ ColorComparisonFace::ColorComparisonFace(const std::string& dir) : outputDir(dir
@@ -69,10 +69,11 @@ ColorComparisonFace::ColorComparisonFace(const std::string& dir) : outputDir(dir
|
|
|
|
|
// 添加颜色信息(带图像区域)
|
|
|
|
|
void ColorComparisonFace::addColorInfo(int faceId, |
|
|
|
|
const MeshColor& gaussianColor, |
|
|
|
|
const MeshColor& originalColor, |
|
|
|
|
const cv::Mat& imageRegion, |
|
|
|
|
float distance, float threshold, |
|
|
|
|
const std::string& filename) { |
|
|
|
|
ColorInfo info = {faceId, gaussianColor, imageRegion.clone(), distance, threshold, filename}; |
|
|
|
|
ColorInfo info = {faceId, gaussianColor, originalColor, imageRegion.clone(), distance, threshold, filename}; |
|
|
|
|
faceViewColorMap[faceId][filename].push_back(info); |
|
|
|
|
printf("addColorInfo faceId=%d", faceId); |
|
|
|
|
} |
|
|
|
|
@ -272,11 +273,17 @@ void ColorComparisonFace::createBatchComparison(int maxBlocksPerRow, int maxFace
@@ -272,11 +273,17 @@ void ColorComparisonFace::createBatchComparison(int maxBlocksPerRow, int maxFace
|
|
|
|
|
|
|
|
|
|
// 添加颜色值
|
|
|
|
|
cv::putText(faceImage, |
|
|
|
|
cv::format("Gaussian: R=%d, G=%d, B=%d", |
|
|
|
|
cv::format("Gauss: (%d,%d,%d)", |
|
|
|
|
info.gaussianColor[0], info.gaussianColor[1], info.gaussianColor[2]), |
|
|
|
|
cv::Point(blockX + 10, infoY + 60), |
|
|
|
|
cv::FONT_HERSHEY_SIMPLEX, 0.35, cv::Scalar(0, 0, 0), 1); |
|
|
|
|
|
|
|
|
|
cv::putText(faceImage, |
|
|
|
|
cv::format("Orgin: (%d,%d,%d)", |
|
|
|
|
info.originalColor[0], info.originalColor[1], info.originalColor[2]), |
|
|
|
|
cv::Point(blockX + 140, infoY + 60), |
|
|
|
|
cv::FONT_HERSHEY_SIMPLEX, 0.35, cv::Scalar(0, 0, 0), 1); |
|
|
|
|
|
|
|
|
|
// 添加距离和阈值
|
|
|
|
|
cv::putText(faceImage, |
|
|
|
|
cv::format("Distance: %.4f", info.distance), |
|
|
|
|
|