开发者

How can I auto-crop a pre-defined polygon shape from an image file?

开发者 https://www.devze.com 2023-01-28 07:39 出处:网络
Ideally using a Python library or processing.org, I need to import开发者_JAVA百科 an image and then crop a predefined polygon area from this image using x,y coordinates (vertices).

Ideally using a Python library or processing.org, I need to import开发者_JAVA百科 an image and then crop a predefined polygon area from this image using x,y coordinates (vertices).

Thanks.


Try PythonMagick. Your question appears to be a cut-and-dry application of crop through specification of image geometry.

(More ImageMagick ports and documentation.)


Also check out PIL.

Though this is hardly library specific and almost every library should support this.

0

精彩评论

暂无评论...
验证码 换一张
取 消