GithubHelp home page GithubHelp logo

imgvis's Introduction

ImgVis

Visualize images with graphs

Requiered packages

  • Matplotlib - pip install matplotlib
  • Pillow - pip install pillow
  • Numpy - pip install numpy

3D Functions

Each function has the following parameters:

  • image (str): The path to the image.
  • compression (int): The compression of the image. This is the times that the image is compressed. The higher the compression, the faster the function will run, but the less accurate the graph will be. The default value is 0 which means that the image will not be compressed.

Colour 3D

Demo

Visualize the colour of the image in 3D space. The x-axis is the red channel, the y-axis is the green channel and the z-axis is the blue channel.

import ImgVis

ImgVis.colour_3d("example.png", compression=10)

Brightness 3D

Demo

Visualize the brightness of the image in 3D space. The x-axis is the red channel, the y-axis is the green channel and the z-axis is the blue channel.

import ImgVis

ImgVis.brightness_3d("example.png", compression=10)

Red 3D

Demo

Visualize the red channel of the image in 3D space. The x-axis is the red channel, the y-axis is the green channel and the z-axis is the blue channel.

import ImgVis

ImgVis.red_3d("example.png", compression=10)

Green 3D

Demo

Visualize the green channel of the image in 3D space. The x-axis is the red channel, the y-axis is the green channel and the z-axis is the blue channel.

import ImgVis

ImgVis.green_3d("example.png", compression=10)

Blue 3D

Demo

Visualize the blue channel of the image in 3D space. The x-axis is the red channel, the y-axis is the green channel and the z-axis is the blue channel.

import ImgVis

ImgVis.blue_3d("example.png", compression=10)

2D Functions

The 2D functions have the following parameters:

  • image (str): The path to the image

Red Line 2D

Demo

Visualize the red channel of the image in 2D space. The x-axis is the red channel and the y-axis is the green channel.

import ImgVis

ImgVis.red_line_2d("example.png")

Green Line 2D

Demo

Visualize the green channel of the image in 2D space. The x-axis is the red channel and the y-axis is the green channel.

import ImgVis

ImgVis.green_line_2d("example.png")

Blue Line 2D

Demo

Visualize the blue channel of the image in 2D space. The x-axis is the red channel and the y-axis is the green channel.

import ImgVis

ImgVis.blue_line_2d("example.png")

Combined Line 2D

Demo

Visualize the red, green and blue channel of the image in 2D space. The x-axis is the red channel and the y-axis is the green channel.

import ImgVis

ImgVis.combined_line_2d("example.png")

Demo script

The demo script is located in the demo.py file. This script will run all the functions with the example image.

Licence

This project is licenced under the GNU General Public License v3.0. See the LICENCE file for more information.

imgvis's People

Contributors

0x4248 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.