Skip to main content

Image Processing For Machine Learning

Project description

Image Processing For Machine Learning package.

How to use ?

To use, simply do :

>>> from PIL import Image
>>> from ipfml import image_processing
>>> img = Image.open('path/to/image.png')
>>> s = image_processing.get_LAB_L_SVD_s(img)

Modules

This project contains modules.

  • image_processingImage processing module
    • fig2data(fig): Convert a Matplotlib figure to a 3D numpy array with RGB channels and return it

    • fig2img(fig): Convert a Matplotlib figure to a PIL Image in RGB format and return it

    • get_LAB_L_SVD_U(image): Returns U SVD from L of LAB Image information

    • get_LAB_L_SVD_s(image): Returns s (Singular values) SVD from L of LAB Image information

    • get_LAB_L_SVD_V(image): Returns V SVD from L of LAB Image information

    • divide_in_blocks(image, block_size): Divide image into equal size blocks

    • rgb_to_mscn(image): Convert RGB Image into Mean Subtracted Contrast Normalized (MSCN) using only gray level

    • rgb_to_grey_low_bits(image, bind=15): Convert RGB Image into grey image using only 4 low bits values by default

    • rgb_to_LAB_L_low_bits(image, bind=15): Convert RGB Image into LAB L channel image using only 4 low bits values by default

    • normalize_arr(arr): Normalize array values

    • normalize_arr_with_range(arr, min, max): Normalize array values with specific min and max values

    • normalize_2D_arr(arr): Return 2D array normalize from its min and max values

  • metricsMetrics computation of PIL or 2D numpy image
    • get_SVD(image): Transforms PIL Image into SVD

    • get_SVD_U(image): Transforms PIL Image into SVD and returns only ‘U’ part

    • get_SVD_s(image): Transforms PIL Image into SVD and returns only ‘s’ part

    • get_SVD_V(image): Transforms PIL Image into SVD and returns only ‘V’ part

    • get_LAB(image): Transforms PIL Image into LAB

    • get_LAB_L(image): Transforms PIL Image into LAB and returns only ‘L’ part

    • get_LAB_A(image): Transforms PIL Image into LAB and returns only ‘A’ part

    • get_LAB_B(image): Transforms PIL Image into LAB and returns only ‘B’ part

    • get_XYZ(image): Transforms PIL Image into XYZ

    • get_XYZ_X(image): Transforms PIL Image into XYZ and returns only ‘X’ part

    • get_XYZ_Y(image): Transforms PIL Image into XYZ and returns only ‘Y’ part

    • get_XYZ_Z(image): Transforms PIL Image into XYZ and returns only ‘Z’ part

    • get_low_bits_img(image, bind=15): Returns Image or Numpy array with data information reduced using only low bits (by default 4)

All these modules will be enhanced during development of the project

How to contribute

This git project uses git-flow implementation. You are free to contribute to it.

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

IPFML-0.1.4.tar.gz (128.5 kB view details)

Uploaded Source

File details

Details for the file IPFML-0.1.4.tar.gz.

File metadata

  • Download URL: IPFML-0.1.4.tar.gz
  • Upload date:
  • Size: 128.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for IPFML-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fe7f4ddcf11f8234bd328fb38907ccc6da1491dcc16d826766ebb22d6a93da21
MD5 fdeac1e4f1345f8d433d221ccb4aa6b1
BLAKE2b-256 5c4f4551a70effbbb0d32f74d0a1259934a0c3289508cb229d4baadfc6584c4a

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