Cython — 局部自适应对比度增强(ACE)

局部自适应对比度增强算法用于图片增强。
原理见:原文:https://wangsp.blog.csdn.net/article/details/106849111

使用Cython重写代码,优化了运行时间。
jupyter notebook :%load_ext Cython
编译命令:python setup.py build_ext --inplace

python测试代码(优化前):

# -*- coding: utf-8 -*-
import numpy as np
import cv2
import time



def adaptContrastEnhancement(src, winSize, maxCg):
    height,

你可能感兴趣的:(Cython,计算机视觉)