README.rst 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. IPFML
  2. =====
  3. Image Processing For Machine Learning package.
  4. How to use ?
  5. ------------
  6. To use, simply do :
  7. >>> from PIL import Image
  8. >>> from ipfml import image_processing
  9. >>> img = Image.open('path/to/image.png')
  10. >>> s = image_processing.get_LAB_L_SVD_s(img)
  11. Modules
  12. -------
  13. This project contains modules.
  14. - **image_processing** : *Image processing module*
  15. - fig2data(fig): *Convert a Matplotlib figure to a 3D numpy array with RGB channels and return it*
  16. - fig2img(fig): *Convert a Matplotlib figure to a PIL Image in RGB format and return it*
  17. - get_LAB_L_SVD_U(image): *Returns U SVD from L of LAB Image information*
  18. - get_LAB_L_SVD_s(image): *Returns s (Singular values) SVD from L of LAB Image information*
  19. - get_LAB_L_SVD_V(image): *Returns V SVD from L of LAB Image information*
  20. - divide_in_blocks(image, block_size): Divide image into equal size blocks
  21. - rgb_to_mscn(image): *Convert RGB Image into Mean Subtracted Contrast Normalized (MSCN) using only gray level*
  22. - rgb_to_grey_low_bits(image, bind=15): *Convert RGB Image into grey image using only 4 low bits values by default*
  23. - normalize_arr(arr): *Normalize array values*
  24. - normalize_arr_with_range(arr, min, max): *Normalize array values with specific min and max values*
  25. - normalize_2D_arr(arr): *Return 2D array normalize from its min and max values*
  26. - **metrics** : *Metrics computation of PIL or 2D numpy image*
  27. - get_SVD(image): *Transforms PIL Image into SVD*
  28. - get_SVD_U(image): *Transforms PIL Image into SVD and returns only 'U' part*
  29. - get_SVD_s(image): *Transforms PIL Image into SVD and returns only 's' part*
  30. - get_SVD_V(image): *Transforms PIL Image into SVD and returns only 'V' part*
  31. - get_LAB(image): *Transforms PIL Image into LAB*
  32. - get_LAB_L(image): *Transforms PIL Image into LAB and returns only 'L' part*
  33. - get_LAB_A(image): *Transforms PIL Image into LAB and returns only 'A' part*
  34. - get_LAB_B(image): *Transforms PIL Image into LAB and returns only 'B' part*
  35. - get_XYZ(image): *Transforms PIL Image into XYZ*
  36. - get_XYZ_X(image): *Transforms PIL Image into XYZ and returns only 'X' part*
  37. - get_XYZ_Y(image): *Transforms PIL Image into XYZ and returns only 'Y' part*
  38. - get_XYZ_Z(image): *Transforms PIL Image into XYZ and returns only 'Z' part*
  39. - get_low_bits_img(image, bind=15): *Returns Image or Numpy array with data information reduced using only low bits (by default 4)*
  40. All these modules will be enhanced during development of the project
  41. How to contribute
  42. -----------------
  43. This git project uses git-flow_ implementation. You are free to contribute to it.
  44. .. _git-flow : https://danielkummer.github.io/git-flow-cheatsheet/