Skip to content

Make-life-easier Python functions for image processing.

License

Notifications You must be signed in to change notification settings

JankoSmejkal/bimp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

bimp

Make-life-easier Python functions for image processing.

Functions

show_image()

  • Show image using matplotlib. Parameters:
  • 3D/2D image as uint8/16 array.

Output:

  • No output

color2gray()

  • Uses cv2.COLOR_BGR2GRAY, or cv2.COLOR_RGB2GRAY to convert rgb to gray. Parameters:
  • image -> 3D numpy array.
  • bgr -> color channel order. Default -> bgr='True'. Specify bgr='False' if RGB order. Output:
  • Grayscale image

normalize_image()

  • Normalize pixel values to 0 - 1 range Parameters:
  • image -> 3D/2D numpy array of uint8 or uint16 data type. Output:
  • Normalized array of float64 data type

distance()

  • Calculates Euclidian or Manhattan distance Parameters:
  • coords1 -> Expecting tuple with 2 values corresponding to x,y of point 1
  • coords2 -> Expecting tuple with 2 values corresponding to x,y of point 2
  • distance_type -> Expecting string: 'euclidian' or 'manhattan' Output:
  • Distance of chosen type

About

Make-life-easier Python functions for image processing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published