> ## Content Index
> Fetch the complete content index at: https://cms.yufeiran.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 图像处理程序
- URL: https://cms.yufeiran.com/tu-xiang-chu-li-cheng-xu/
- Published: 2022-04-03T16:57:04.000Z
- Updated: 2026-09-27T12:38:01.000Z
- Author: Feiran Yu
- Tags: #legacy-import

## 背景

考上研究生，导师给了我一个图像处理的横向项目的一部分来练手。这个横向项目是来自户外海报公司的。

## 问题

主要需要解决1）将巨大图片生成PDF。 2）对给定多边形和间距d，生成向外扩张间距d的新多边形。

## 解决方案

### 1\. 巨大图片生成PDF

学习PDF文件格式，尝试自己编写生成PDF模块或使用现成库(libHaru/PDFWriter)  
PDFWriter实现裁剪功能

### 2\. 对给定多边形和间距d，生成向外扩张间距d的新多边形

估计是计算几何的知识，由于没学过，先购买了[《计算几何算法分析与设计》](https://book.douban.com/subject/3151802/?ref=cms.yufeiran.com)。  
边退化情况也要考虑[多边形的偏移填充算法](https://www.jianshu.com/p/8c7e7c1afcb6?ref=cms.yufeiran.com)  
[ClipperLib库使用说明](https://codeantenna.com/a/LjhsuBxu3x?ref=cms.yufeiran.com)

### 3.考虑到用户友好，可能需要GUI

QT/Dear ImGui/wxWidgets

## 零碎知识

DPI（英語：Dots Per Inch，每英寸点数）  
1英寸 = 2.54 厘米  
100DPI = 100 Dots Per Inch = 100 / 2.54 Dots Per Cm =39.37 Dots Per Cm

## 参考链接

[LibHaru编译使用](https://www.cnblogs.com/nightnine/p/8947379.html?ref=cms.yufeiran.com)  
[win10上编译libharu库](https://blog.csdn.net/weixin%5F38636815/article/details/116133677?ref=cms.yufeiran.com)  
[多边形或轮廓等距离外扩或收缩](https://blog.csdn.net/hjk61314/article/details/82112610?ref=cms.yufeiran.com)  
[Visual Studio 2019 直接使用wxWidgets二进制文件](https://blog.csdn.net/libeiqi1201/article/details/120098716?ref=cms.yufeiran.com)  
[wxwidgets wiki](https://wiki.wxwidgets.org/Main%5FPage?ref=cms.yufeiran.com)  
[图像处理—关于像素坐标矩阵变换(平移，旋转，缩放，错切)](https://blog.csdn.net/Jarlen/article/details/44877961?ref=cms.yufeiran.com)  
[判断平面多边形的凹凸性](https://blog.csdn.net/swety%5Fgxy/article/details/70176512?ref=cms.yufeiran.com)