Metadata-Version: 2.4
Name: mcap2shadowimg
Version: 0.2.1
Summary: Export MCAP camera frames to PNG with robot coordinate axis overlays
Author: mcap2shadowimg
License-Expression: MIT
Keywords: mcap,robotics,camera,opencv,export
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcap>=1.1.1
Requires-Dist: av>=12.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: opencv-python>=4.8.0
Requires-Dist: protobuf==4.25.1
Requires-Dist: scipy>=1.10.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"

# mcap2shadowimg



将 MCAP 文件中的相机视频帧导出为 PNG，并可在图像上叠加机器人坐标轴。

---



## 安装

```Bash
pip install mcap2shadowimg
```

环境要求：Python 3\.10 \~ 3\.12，macOS / Linux / Windows。



## 快速开始

**单个 MCAP 文件：**

```Bash
mcap2shadowimg --input /path/to/bag.mcap --output ./output
```



**批量处理（目录下多个 ****`.mcap`****）：**

```Bash
mcap2shadowimg --input /path/to/mcap_dir --output ./output
```



**每个 MCAP 会在输出目录下按文件名创建子目录，例如：**

```Plain Text
output/
  my_bag/
    camera2/
      1778813410223851000.png
      ...
```



---



## 常用参数

|参数|默认值|说明|
|---|---|---|
|`--input`|必填|`.mcap` 文件路径，或包含多个 `.mcap` 的目录|
|`--output`|`./output`|PNG 输出目录|
|`-v`, `--verbose`|关闭|输出详细日志|



# *开启详细日志*

```Bash
mcap2shadowimg --input bag.mcap --output ./output -v
```

## 输出说明


- 默认只导出 **camera2** 

- PNG 文件名为 MCAP 的 `log_time`（纳秒时间戳）

- 若某帧缺少标定或机器人位姿，仍会保存原图，只是不绘制坐标轴



## 示例：

\[output\.zip\]



