python-CV常用方法封装

python-CV常用方法封装,第1张

背景

cv领域常用的图片的方法的积累与总结,使用python语言实现

图片裁剪
def cut_img(img_path, after_path, height_start, height_stop, width_start, width_stop):
    img = cv2.imread(img_path)
    cropped_image = img[height_start:height_stop, width_start:width_stop]  # Slicing to crop the image  高:宽
    cv2.imwrite(after_path, cropped_image)

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/917744.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-16
下一篇2022-05-16

发表评论

登录后才能评论

评论列表(0条)

    保存