用透明蒙版从图像中剪切对象

时间:2018-11-13 09:44:55

标签: python image computer-vision python-imaging-library transparency

如果我用遮罩切开对象,则我的图像上带有遮罩以使对象在图像上。

1>------ Up-To-Date check: Project: hello, Configuration: Release Win32 ------
1>All outputs are up-to-date.
1>Time Elapsed 3 ms
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

我得到以下结果(放大)

enter image description here

有什么办法得到这样的东西吗?

enter image description here

在对象周围有一些透明度层次。我知道的唯一方法是使用双循环检查可能会过慢的非屏蔽像素数。现在,只要使用PIL / cv2或其他公共库实现的解决方案,我就不会出现问题,只需用imageio加载图像即可。

0 个答案:

没有答案
相关问题