如何在python中切片图像的特定部分?

问题描述 投票:0回答:1

我有一个输入图像,其深色背景上有一张嘴巴照片:input image

我只希望口部分作为输出:output image

python image opencv image-processing python-imaging-library
1个回答
0
投票

使用https://scikit-image.org/库。您可以如下轻松裁剪。

from skimage import io
image = io.imread(filename)
cropped = image[x1:x2,y1:y2]
© www.soinside.com 2019 - 2024. All rights reserved.