README.rst 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. - 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*
  24. - normalize_arr(arr): *Normalize array values*
  25. - normalize_arr_with_range(arr, min, max): *Normalize array values with specific min and max values*
  26. - normalize_2D_arr(arr): *Return 2D array normalize from its min and max values*
  27. - **metrics** : *Metrics computation of PIL or 2D numpy image*
  28. - get_SVD(image): *Transforms PIL Image into SVD*
  29. - get_SVD_U(image): *Transforms PIL Image into SVD and returns only 'U' part*
  30. - get_SVD_s(image): *Transforms PIL Image into SVD and returns only 's' part*
  31. - get_SVD_V(image): *Transforms PIL Image into SVD and returns only 'V' part*
  32. - get_LAB(image): *Transforms PIL Image into LAB*
  33. - get_LAB_L(image): *Transforms PIL Image into LAB and returns only 'L' part*
  34. - get_LAB_A(image): *Transforms PIL Image into LAB and returns only 'A' part*
  35. - get_LAB_B(image): *Transforms PIL Image into LAB and returns only 'B' part*
  36. - get_XYZ(image): *Transforms PIL Image into XYZ*
  37. - get_XYZ_X(image): *Transforms PIL Image into XYZ and returns only 'X' part*
  38. - get_XYZ_Y(image): *Transforms PIL Image into XYZ and returns only 'Y' part*
  39. - get_XYZ_Z(image): *Transforms PIL Image into XYZ and returns only 'Z' part*
  40. - get_low_bits_img(image, bind=15): *Returns Image or Numpy array with data information reduced using only low bits (by default 4)*
  41. All these modules will be enhanced during development of the project
  42. How to contribute
  43. -----------------
  44. This git project uses git-flow_ implementation. You are free to contribute to it.
  45. .. _git-flow : https://danielkummer.github.io/git-flow-cheatsheet/