# -*- coding: utf-8 -*-
import cv2
import numpy as np
import sys
def integral(image):
rows,cols = image.shape
#行积分运算
inteImageC = np.zeros((rows,cols),np.float32)
for r in range(rows):
for c in range(cols):
if c == 0:
inteImageC[r][c] = image[r][c]
else:
inteImageC[r][c] = inteImageC[r][c-1] + image[r][c]
#列积分运算
inteImage = np.zeros(image.shape,np.float32)
for c in range(cols):
for r in range(rows):
if r == 0:
inteImage[r][c] = inteImageC[r][c]
else:
inteImage[r][c] = inteImage[r-1]</
快速引导滤波python-opencv
最新推荐文章于 2023-03-19 17:06:55 发布