【深度学习】图片预处理,分辨出模糊图片

该篇文章介绍了如何利用OpenCV中的Laplacian方法计算图像的焦点测量,通过设定阈值来识别模糊图像,并将模糊图片按照模糊程度进行排序。作者提到300和400作为阈值可以有效区分清晰和模糊图像。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ref:https://pyimagesearch.com/2015/09/07/blur-detection-with-opencv/
论文 ref:https://www.cse.cuhk.edu.hk/leojia/all_final_papers/blur_detect_cvpr08.pdf
遇到模糊的图片,还要处理一下,把它挑出来,要么修复,要么弃用。否则影响后续效果。

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

根据模糊值排序即可,写在文件名中,自动排序,然后对模糊的去掉即可

import os.path

from imutils import paths
import argparse
import cv2
import shutil


def variance_of_laplacian(image):
    # compute the Laplacian of the image and then return the focus
    # measure, which is simply the variance of the Laplacian
    return cv2.La
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值