GNU General Public License v3.0

项目介绍

em-er-es/clahe 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 GNU General Public License v3.0 许可证,目前获得 8 个 Star、2 次 Fork。

仓库全名
em-er-es/clahe
开源许可证
GNU General Public License v3.0
Star 数
8
Fork 数
2

README 摘要

CLAHE (Contrast Limited Adaptive Histogram Equalization) This procedural Python script filters input images using CLAHE algorithm according to specified parameters. Showcase Example Input | Light | Default | Strong | :-----:|:-----:|:-------:|:------:| -c 0.05 -t 8 8 | -c 2.0 -t 8 8 | -c 6.0 -t 32 32 | Roadmap Currently there is no further development planned. However, should this change, a potential roadmap would…

完整内容见 GitHub 原始 README 或本页 。

常见问题

clahe 用什么语言开发?

主要使用 Python 编写,采用 GNU General Public License v3.0 许可证,目前有 8 个 Star。

clahe 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 clahe 的源码?

可以直接克隆仓库:git clone https://github.com/em-er-es/clahe.git,默认分支为 main;安装与运行步骤见仓库 README。

clahe 最近还在维护吗?

仓库最近一次更新为 2021年11月24日,当前没有未关闭的 Issue;Star 数为 8,可作为社区活跃度的参考。

关于

CLAHE (Contrast Limited Adaptive Histogram Equalization)

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
13
价值分
5
活跃状态
活跃

README

CLAHE (Contrast Limited Adaptive Histogram Equalization)

This procedural Python script filters input images using CLAHE algorithm according to specified parameters.

Showcase

Example

Input Light Default Strong
Input Light Default Strong
-c 0.05 -t 8 8 -c 2.0 -t 8 8 -c 6.0 -t 32 32

Roadmap

Currently there is no further development planned.

However, should this change, a potential roadmap would look like this:

Version 1.0.1:

  1. Rewrite the procedural routine into classes
  2. Modularize depending on functionality
  3. Refactor and optimize specific routines
  4. Documentation via Doxygen

Dependencies

  • Python 2.7
    • OpenCV (cv2)
    • NumPy (numpy)
    • Matplotlib (matplotlib: pyplot, rcParams)
    • Argparse (argparse)

Ubuntu/Debian

Due to current state of limitation to the already past EOL Python 2.7, the following is valid for Ubuntu 18.04 LTS only, which at time of writing is reaching its EOL as well.

# apt install python-{argcomplete,matplotlib,numpy,opencv}

Download

Get the source code

$ git clone https://github.com/em-er-es/clahe

For running the script on Docker use the overlay repository inside clahe

$ git clone https://github.com/em-er-es/devops

Running

$ python2 clahe.py -i input.png -o output-a.png
$ python clahe.py -c 2 -t 16 16 -i input.png -o output-b.png

To generate all processing outcomes, run the included script:

$ bash mask.sh

Installation

Installation is optional. Since neither build nor package capability have been developed, and the script is self contained, simply install it into a directory under your $PATH or equivalent.

To adhere to FHS, which you can read about in $ man file-hierarchy, use ~/.local/bin.

$ printf ${PATH//:/'\n'} | grep local
/home/user/.local/bin
/usr/local/sbin
/usr/local/bin

$ install -m 750 clahe.py "$HOME/.local/bin/clahe"

If your $PATH does not hold ~/.local/bin, you can expand it in your ~/.profile/~/.bashrc or equivalent via export PATH="${HOME}/.local/bin:${PATH}". This will prioritize local user path over the system ones.

Usage

Usage: clahe.py [-h] [-i FILENAMEINPUT] [-o FILENAMEOUTPUT] [-c CLIPLIMIT]
                [-sv] [-si SHOWIMAGES <0-b2><!0>]
                [-t TILESIZE !8x8 TILESIZE !8x8]

Perform basic image processing on input by using CLAHE algorithm to generate
output.

optional arguments:
  -h, --help            show this help message and exit
  -i FILENAMEINPUT, --input FILENAMEINPUT
                        Input image
  -o FILENAMEOUTPUT, --output FILENAMEOUTPUT
                        Output image
  -c CLIPLIMIT, --clipping-limit CLIPLIMIT
                        Clipping limit
  -sv, --save-images    Save images
  -si SHOWIMAGES <0-b2><!0>, --show-images SHOWIMAGES <0-b2><!0>
                        Show images
  -t TILESIZE !8x8 TILESIZE !8x8, --tile-size TILESIZE !8x8 TILESIZE !8x8
                        Tile size

评论

暂无评论