Image Processing Program

Share

Background

After I was admitted to graduate school, my advisor gave me part of an image-processing industry project as practice. The project came from an outdoor poster company.

Problems

The main requirements were:

  1. Generate PDFs from huge images.
  2. Given a polygon and a spacing value d, generate a new polygon expanded outward by distance d.

Solutions

1. Generate PDFs from huge images

Study the PDF file format, and try either writing a PDF generation module by myself or using existing libraries such as libHaru or PDFWriter.

PDFWriter was used to implement cropping.

2. Generate an outward-offset polygon from a given polygon and spacing d

This is probably computational geometry. Since I had not studied it before, I first bought Computational Geometry: Algorithm Analysis and Design.

Edge-degeneration cases also need to be considered. References:

Polygon offset and fill algorithm

ClipperLib usage notes

3. A GUI may be needed for user friendliness

QT / Dear ImGui / wxWidgets

Notes

DPI means Dots Per Inch.

1 inch = 2.54 cm

100 DPI = 100 Dots Per Inch = 100 / 2.54 Dots Per Cm = 39.37 Dots Per Cm

Compiling and using LibHaru

Compiling libharu on Windows 10

Offsetting or shrinking polygons and contours by equal distance

Using wxWidgets binaries directly in Visual Studio 2019

wxWidgets wiki

Image processing: pixel-coordinate matrix transforms, including translation, rotation, scaling, and shearing

Determining whether a plane polygon is convex or concave

Read more

可多路视频播放的VisionOS 媒体查看器开发

可多路视频播放的VisionOS 媒体查看器开发

开发一款能够同时播放多个视频的vision pro媒体查看器。 0:00 /0:40 1× 缘起 Vision Pro 发布时我就特别想买,毕业工作后终于有资金购入并加入Apple开发者计划,从今年五月到现在也用了快小半年,用起来确实挺爽。 但是有些痛点还是很难受,其中一个痛点就是无法同时播放多个视频音频(实际上VisionOS提供了同时播放音频的API,但是似乎我用的APP都是不遵守🤣 导致都在抢占),因此为了满足我自己的这个痛点,也学习一下Vision OS 的应用开发,甚至完成度足够的话考虑上架App Store,便有了这个目标是多视频同时播放的媒体查看器项目。 现有工作 我购买了4XVR、Infuse、Moon Player、ES 文件助手(这款只有iPad OS版,不是专供Vision OS的),这几个月体验下来,全都存在我提到的和其他APP抢占音频通道,无法同时播放的问题,其他的我的主观的体验如下: 4XVR:使用最多,用起来最舒服,格式支持很全,VR视频也能看,号称全v

By Feiran Yu