My Project
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
MainDisplay.MainDisplay Class Reference

Public Member Functions

 __init__ (self)
 
 readImage (self, image_path)
 
 setImage (self, image)
 
 saveImage (self)
 

Public Attributes

 result_image
 

Detailed Description

@brief The MainDisplay class provides functionalities for image handling and display.

@details
The class includes methods for:
- Reading an image from a specified path.
- Setting the result image.
- Displaying the result image using the OpenCV library.

@note
Ensure that the OpenCV library is installed (`pip install opencv-python`) before using this class.

@date January 18, 2024

Constructor & Destructor Documentation

◆ __init__()

MainDisplay.MainDisplay.__init__ (   self)
@brief Initializes a MainDisplay object.

@details
The result_image attribute is initialized to None.

Member Function Documentation

◆ readImage()

MainDisplay.MainDisplay.readImage (   self,
  image_path 
)
@brief Reads an image from the specified path.

@param image_path: The path to the image file.

@return The read image.

◆ saveImage()

MainDisplay.MainDisplay.saveImage (   self)
@brief Displays and saves the result image.

@details
The result image is displayed in a window with the window name indicating the displayed image.
The window remains open until a key is pressed. Then, it is closed, and the program continues.

@note
Ensure that the OpenCV window is closed before proceeding with the execution of other code.

@warning
This method uses blocking code (cv2.waitKey(0)) that might lead to issues in certain scenarios.

◆ setImage()

MainDisplay.MainDisplay.setImage (   self,
  image 
)
@brief Sets the result image.

@param image: The image to set as the result image.

@return The set result image.

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