Skip to main content

Defogging based on Python

Project description

https://img.shields.io/pypi/v/defogging.svg https://img.shields.io/travis/scloudyy/Defogging.svg

Implement a robust and efficient defogging method with Python

Features

  • Defogging a single foggy image

install

Use pip to install:

$ pip install defogging

Or you can install from source:

$ git clone git@github.com:scloudyy/Defogging.git
$ cd Defogging
$ python setup.py build
$ pip install .

Usage

Use defogging through command line:

$ defogging your_img.bmp

the result will be saved as your_img_defogging.bmp

And you can also use defogging in your own code:

from defogging import Defog

in_name = "foggy.bmp"
out_name = "defogged.bmp"

df = Defog()
df.read_img(in_name)
df.defog()
df.save_img(out_name)

you can directly input a foggy object in the form of numpy.array :

df.read_array(your_array, range)

where range indicates the value range of your array.The range has two options: the first is 1, which means the value range of your array is [0,1], and the second is 255, which means the value range is [0,255]

If you want to process the defogged object further, you can also get defogged array:

dst = df.get_array(range)

also, range indicates the value range of returned array, either 1 or 255. If you choose 1, the range will lie in [0,1], and the type of it is float. Or if you choose 255, the range will be [0,255], and the type will be uint8.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

defogging-0.1.7.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

defogging-0.1.7-py3.5.egg (15.3 kB view details)

Uploaded Source

File details

Details for the file defogging-0.1.7.tar.gz.

File metadata

  • Download URL: defogging-0.1.7.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for defogging-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e332fe2947243deb12bd77a8550c1b1694d5d03ae7904eb367970e2e7655668b
MD5 38afded1e72f11d64eb955d6f83b2913
BLAKE2b-256 8ecd9f30c78d21cf406f21593ca5fbfc1a1e0e6c1ce131eee67287492530aabc

See more details on using hashes here.

File details

Details for the file defogging-0.1.7-py3.5.egg.

File metadata

File hashes

Hashes for defogging-0.1.7-py3.5.egg
Algorithm Hash digest
SHA256 232f91050c906156aad1850cb11c60f4913bb55bb6b5512e1ac9e4def97ed97b
MD5 625398a050e2dcac492a41ef7398a4cb
BLAKE2b-256 c2cb841c7a97479e21251c5301419a10f0306a5cbf25ff367b475748ea994871

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page