This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/*
* @Description: 独立 JPEG 解码模块 —— 从文件路径解码 JPEG 图片
* 支持单文件中包含多张 JPEG(SOI/EOI 标记分隔),纵向拼接为一张灰度图
*/
#ifndef JPG_DECODER_H_
#define JPG_DECODER_H_
#include <opencv2/opencv.hpp>
#include <string>
/**
* @brief 解码 JPEG 图片文件
* 自动处理单文件中包含多张 JPEG 的情况(通过 SOI/EOI 标记),
* 将所有图片纵向拼接为一张灰度图返回
*
* @param filePath 待解码的图片文件路径
* @return cv::Mat 解码后的灰度图(CV_8UC1),失败则返回空 Mat
cv::Mat decodeJpgImage(const std::string &filePath);
#endif // JPG_DECODER_H_