friendblend.processing package¶
Subpackages¶
Submodules¶
friendblend.processing.alpha_blending module¶
Alpha Blending
friendblend.processing.color_correction module¶
Contains code for color correction of the image. CLAHE - Contrast Limited Adaptive Histogram Equalization
-
friendblend.processing.color_correction.
apply_clahe
(img, clip_limit=3.0, n_bins=256, grid=(7, 7))[source]¶ - Parameters:
The input image in BGR format
The clip limit for contrast limiting
Number of bins to divide the image into
Grid size to be used while performing adaptive histogram equalization
-
friendblend.processing.color_correction.
clahe
(img, clip_limit=3.0, n_bins=256, grid=(7, 7))[source]¶ Divides the image into frames/cells using the grid values passed to the function
Creates a separate histogram for each cell/frame after binning the values
The histogram equalization mapping for each cell/frame is also generated
The contrast of the image is limited by clipping bin values with ‘clip_limit’
Adaptive histogram equalization
-
friendblend.processing.color_correction.
rgb2lab
(img)[source]¶ Converts an RGB image to L*a*b* space Implements formulas described at: https://docs.opencv.org/3.4/de/d25/imgproc_color_conversions.html
friendblend.processing.face_body_detection module¶
Face and body detection
-
friendblend.processing.face_body_detection.
get_body
(img, face_bounds)[source]¶ Calculates the body bounds using face bounds
friendblend.processing.grab_cut module¶
Grab Cut
-
friendblend.processing.grab_cut.
crop_fg
(fg, bg)[source]¶ Superimposes cropped foreground from grabcut onto background image
friendblend.processing.helpers module¶
Common functions used multiple times
friendblend.processing.keypoint module¶
Contains code for keypoint detection and matching