Source code for Apps_Surveillance

"""
This module defines the Surveillance class, which manages surveillance operations in a PyQt application.

Classes:
    - Surveillance: A class for managing surveillance operations.

Dependencies:
    - ShowResult: A module providing functionality to display various types of images.
"""

from ShowResult import ShowImageResult


[docs] class Surveillance: """ Surveillance class manages surveillance operations in a PyQt application. Attributes: parent: Reference to the MainWindow of the application. show: Instance of ShowImageResult to display images. Methods: - __init__: Initializes the Surveillance object. - surveillance: Performs surveillance operations and displays the result. """ def __init__(self, MainWindow): self.parent = MainWindow self.show = ShowImageResult(self.parent)
[docs] def surveillance(self): """ Performs surveillance operations and displays the result. If an image is available, it displays the original image and shows any associated annotations. """ if self.parent.image is None: pass else: image = self.parent.image.copy() self.show.showOriginalImage(image) if self.parent.ui.checkAnypoint.isChecked(): self.parent.anypoint.showPolygon() self.show.showPanoAnyImage(self.parent.angle) elif self.parent.ui.checkPanorama.isChecked(): self.parent.panorama.showOriginalPanorama() self.show.showPanoAnyImage() else: self.show.showResult(image)