如何使用枕头库使用抖动?
我想从枕头上使用抖动,( https://pillow.readthedocs.io/en/stable/reference/image.html#pil.image.image.image.dither.fither.floydsteinberg )
我的问题是如何从枕头上导入抖动,
遵循我的代码,是我的代码,是我的代码,
import os
from PIL import Image
ORIGIN_PATH = "/home/prajakta/Tasks/Evaluate detection model on scanned customer documents/scanned_docs/"
#DESTIN_PATH = "/home/prajakta/Tasks/Evaluate detection model on scanned customer documents/scanned_docs_grayscale/"
for filename in os.listdir(ORIGIN_PATH):
img = Image.open(ORIGIN_PATH + filename).convert("L", dither=Image.Dither)
img.show()
先感谢您。
I want to use Dithering from pillow, (https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Dither.FLOYDSTEINBERG)
My question is how to import dither from pillow,
Following is my code,
import os
from PIL import Image
ORIGIN_PATH = "/home/prajakta/Tasks/Evaluate detection model on scanned customer documents/scanned_docs/"
#DESTIN_PATH = "/home/prajakta/Tasks/Evaluate detection model on scanned customer documents/scanned_docs_grayscale/"
for filename in os.listdir(ORIGIN_PATH):
img = Image.open(ORIGIN_PATH + filename).convert("L", dither=Image.Dither)
img.show()
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论