python去噪算法_最新可复现图像去噪算法汇总

reproducible-image-denoising-state-of-the-art

Collection of popular and reproducible single image denoising works. This collection is inspired by the summary by flyywh

Criteria: works must have codes available, and the reproducible results demonstrate state-of-the-art performances.

Check out the following collections of reproducible state-of-the-art algorithms:

Denoising Algorithms (AWGN)

Filtering

NLM [Web] [Code] [PDF]

A non-local algorithm for image denoising (CVPR 05), Buades et al.

Image denoising based on non-local means filter and its method noise thresholding (SIVP2013), B. Kumar

BM3D [Web] [Code] [PDF]

Image restoration by sparse 3D transform-domain collaborative filtering (SPIE Electronic Imaging 2008), Dabov et al.

PID [Web] [Code] [PDF]

Progressive Image Denoising (TIP 2014), C. Knaus et al.

Sparse Coding

KSVD [Web] [Code] [PDF]

Image Denoising Via Sparse and Redundant Representations Over Learned Dictionaries (TIP 2006), Elad et al.

LSSC [Web] [Code] [PDF]

Non-local Sparse Models for Image Restoration (ICCV 2009), Mairal et al.

NCSR [Web] [Code] [PDF]

Nonlocally Centralized Sparse Representation for Image Restoration (TIP 2012), Dong et al.

OCTOBOS [Web] [Code] [PDF]

Structured Overcomplete Sparsifying Transform Learning with Convergence Guarantees and Applications (IJCV 2015), Wen et al.

GSR [Web] [

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
您好!对于GrabCut算法Python,可以使用OpenCV库来实。以下是一个基本的示例代码: ```python import numpy as np import cv2 # 通过鼠标交互定义前景和背景区域 def mouse_callback(event, x, y, flags, param): global drawing, rect, rect_state if event == cv2.EVENT_LBUTTONDOWN: drawing = True rect_state = True rect[0] = x rect[1] = y elif event == cv2.EVENT_LBUTTONUP: drawing = False elif event == cv2.EVENT_MOUSEMOVE: if drawing: if rect_state: rect[2] = x - rect[0] rect[3] = y - rect[1] # 图像路径 image_path = 'path_to_image.jpg' # 加载图像并创建一个掩码 image = cv2.imread(image_path) mask = np.zeros(image.shape[:2], np.uint8) # 定义前景和背景的模型 bgd_model = np.zeros((1, 65), np.float64) fgd_model = np.zeros((1, 65), np.float64) # 定义矩形区域 rect = np.zeros(4, np.int32) rect_state = False drawing = False # 创建窗口并设置鼠标回调函数 cv2.namedWindow('image') cv2.setMouseCallback('image', mouse_callback) while True: # 显示原始图像及交互框选矩形区域 display_image = image.copy() if rect_state: cv2.rectangle(display_image, (rect[0], rect[1]), (rect[0] + rect[2], rect[1] + rect[3]), (0, 255, 0), 2) cv2.imshow('image', display_image) key = cv2.waitKey(1) & 0xFF # 按键处理 if key == ord('q'): break elif key == ord('r'): # 重置矩形区域 rect_state = False rect = np.zeros(4, np.int32) mask = np.zeros(image.shape[:2], np.uint8) elif key == ord('c'): # 运行GrabCut算法 cv2.grabCut(image, mask, tuple(rect), bgd_model, fgd_model, 5, cv2.GC_INIT_WITH_RECT) # 将掩码中的可能的前景和可能的背景设为前景和背景 mask2 = np.where((mask == 2) | (mask == 0), 0, 1).astype('uint8') result = image * mask2[:, :, np.newaxis] # 显示结果 cv2.imshow('result', result) cv2.destroyAllWindows() ``` 这段代码实了GrabCut算法的基本功能,通过鼠标交互选择前景和背景区域,并在按下键盘上的"c"键时进行算法运行并显示结果。通过按下键盘上的"r"键,您可以重置选择的矩形区域。 请将代码中的`'path_to_image.jpg'`替换为您要处理的图像路径,然后运行代码即可进行GrabCut算法。希望对您有帮助!如有其他问题,请随时提问。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值