Files
hfut-bishe/client/core/depth/DepthService.h
2026-04-07 20:55:30 +08:00

21 lines
638 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include <QImage>
#include <QSize>
namespace core {
class DepthService final {
public:
// 生成 8-bit 深度图0 最远255 最近。当前实现为全 0假深度
static QImage computeFakeDepth(const QSize& size);
static QImage computeFakeDepthFromBackground(const QImage& background);
// 把 8-bit 深度Grayscale8映射为伪彩色 ARGB32带 alpha用于叠加显示。
// 约定depth=0最远-> 蓝depth=255最近-> 红(线性插值)。
static QImage depthToColormapOverlay(const QImage& depth8, int alpha /*0-255*/);
};
} // namespace core