|
PBL4
|
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. | |
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.
| img_processor.ImgProcessor.__init__ | ( | self, | |
| config ) |
Initializes the ImgProcessor object.
Sets the configuration object to retrieve parameters like overlap width and gamma values.
| config | Configuration object containing parameters. |
| 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.
| l_img | Left image. |
| r_img | Right image. |
| 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.
| 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.
| img | Input image. |