一起拼接照片 [英] Stitching Photos together
问题描述
因此,对于我正在进行的这个项目,我有2张照片。这两张照片需要拼接在一起,一张在顶部,一张在底部,然后你就可以看到整个画面了。关于我应该用什么模块来做这个的任何想法?
So for this project I'm working on, I have 2 photos. These two photos need to be stitched together, one on the top and one on the bottom, and then you will be able to see the whole picture. Any ideas on what module I should use to do this?
推荐答案
python成像库将吃早餐。
参见教程,特别是剪切,粘贴和合并图像部分,以获得一些相关帮助。
See the tutorial in particular the "Cutting, Pasting and Merging Images" section for some relevant help.
对于粗略轮廓,使用 Image.open
加载两个图像,使用大小$ c $找出输出图像的大小c>属性和一些添加,用
Image.new
创建输出图像,然后使用粘贴
方法过去两个原始图像。
For rough outline, load both images with Image.open
, find out how big the output image will be by using the size
attribute and some addition, create the output image with Image.new
and then use the paste
method to past the two original images in.
这篇关于一起拼接照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!