PBL4_2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
imageBlender.ImageBlender Class Reference

A class for blending two images using a specified blend ratio and gamma correction. More...

Public Member Functions

 __init__ (self, gamma_corrector, blend_ratio=0.21)
 Constructor for ImageBlender.
 
 blend_images (self, left_image, right_image)
 Blends two images together using the blend ratio and gamma correction.
 
 process_images (self, left_image_path, right_image_path)
 Processes two images by applying gamma correction and blending them.
 

Public Attributes

 gamma_corrector
 
 blend_ratio
 

Detailed Description

A class for blending two images using a specified blend ratio and gamma correction.

Definition at line 17 of file imageBlender.py.

Constructor & Destructor Documentation

◆ __init__()

imageBlender.ImageBlender.__init__ (   self,
  gamma_corrector,
  blend_ratio = 0.21 
)

Constructor for ImageBlender.

Parameters
gamma_correctorAn instance of GammaCorrector for applying gamma correction.
blend_ratioThe ratio at which images will be blended, default is 0.21.

Definition at line 28 of file imageBlender.py.

Member Function Documentation

◆ blend_images()

imageBlender.ImageBlender.blend_images (   self,
  left_image,
  right_image 
)

Blends two images together using the blend ratio and gamma correction.

Parameters
left_imageThe left image to be blended.
right_imageThe right image to be blended.
Returns
A tuple containing the blended left and right images.

Definition at line 41 of file imageBlender.py.

◆ process_images()

imageBlender.ImageBlender.process_images (   self,
  left_image_path,
  right_image_path 
)

Processes two images by applying gamma correction and blending them.

Parameters
left_image_pathPath to the left image.
right_image_pathPath to the right image.
Returns
A tuple of adjusted left, adjusted right, and blended images.
Exceptions
FileNotFoundErrorIf one of the input images is not found.

Definition at line 73 of file imageBlender.py.

Member Data Documentation

◆ blend_ratio

imageBlender.ImageBlender.blend_ratio

Definition at line 31 of file imageBlender.py.

◆ gamma_corrector

imageBlender.ImageBlender.gamma_corrector

Definition at line 30 of file imageBlender.py.


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