PBL4
Loading...
Searching...
No Matches
img_processor.ImgProcessor Class Reference

Performs alpha blending and gamma correction. More...

Public Member Functions

 __init__ (self, config)
 Initializes the ImgProcessor object.
 
 alphaBlend (self, l_img, r_img)
 Performs alpha blending on overlapping regions of two images.
 
 GammaCorrection (self, img)
 Applies gamma correction to an image.
 
 cropImage (self)
 Crops the left and right halves of an image with overlap.
 

Detailed Description

Performs alpha blending and gamma correction.

This class provides methods for image processing, including alpha blending of overlapping image regions and gamma correction for brightness adjustment.

Constructor & Destructor Documentation

◆ __init__()

img_processor.ImgProcessor.__init__ ( self,
config )

Initializes the ImgProcessor object.

Sets the configuration object to retrieve parameters like overlap width and gamma values.

Parameters
configConfiguration object containing parameters.

Member Function Documentation

◆ alphaBlend()

img_processor.ImgProcessor.alphaBlend ( self,
l_img,
r_img )

Performs alpha blending on overlapping regions of two images.

Blends the overlapping regions of the left and right images using a linear gradient alpha mask.

Parameters
l_imgLeft image.
r_imgRight image.
Returns
Tuple containing processed left and right images.

◆ cropImage()

img_processor.ImgProcessor.cropImage ( self)

Crops the left and right halves of an image with overlap.

Reads the image from the specified path, splits it into left and right halves with the overlap region, and returns the cropped images.

Returns
Tuple containing cropped left and right images.

◆ GammaCorrection()

img_processor.ImgProcessor.GammaCorrection ( self,
img )

Applies gamma correction to an image.

Adjusts the brightness of the image using gamma correction based on the gamma value in the configuration.

Parameters
imgInput image.
Returns
Gamma-corrected image.

The documentation for this class was generated from the following file: