Views

Main Views

class Ui_Controller.Controller(*args: Any, **kwargs: Any)[source]

Bases: QMainWindow

The controller class to control UI MainWindow

construction method

connect_button()[source]

Connect the button and event to the function

open_image()[source]

Load image frame

open_video_file()[source]

Load video file.

onclick_open_camera()[source]

showing the window to select the _source camera

cameraOpen()[source]

Open camera following the _source given.

next_frame_slot()[source]

Control video frame.

init_ori_ratio(image)[source]

Calculate the initial ratio of the image. :param ratio_x = ratio width between image and ui window.: :param ratio_y = ratio height between image and ui window.: :param center = find the center image on window user interface.:

Returns:

ratio_y: center:

Return type:

ratio_x

mouse_event(e)[source]

Specify coordinate from mouse left event.

mouseDoubleclic_event(e)[source]

Reset to default by mouse event.

mouse_wheelEvent(e)[source]

Resize image using mouse wheel event.

mouseMovedOriImage(e)[source]

Mouse move event to look in surrounding view in original label image

mouse_release_event(e)[source]

Mouse release event left click to show menu.

menuMouseEvent(e)[source]

showing the menu image when release left click.

saveImage()[source]

Save image on local directory

selectDir()[source]

Select directory to save object such as image and video.

aboutUs()[source]

showing prompt About us information (MOIL LAB)

help()[source]

showing the message box to show help information obout this application

exit()[source]

Exit the apps with showing the QMessageBox.

closeEvent(event)[source]

Control exit application by ask yes or no question.

Ui_Mainwindow

class Ui_Mainwindow.Ui_MainWindow[source]

Bases: object

setupUi(MainWindow)[source]
retranslateUi(MainWindow)[source]

Ui_Utils

Ui_Utils.select_file(title, dir_path, file_filter)[source]

find the file path from the directory computer

Parameters:
  • title – the title window of open dialog

  • file_filter – determine the specific file want to search

  • dir_path – Navigate to specific directory

Return type:

file_path

Ui_Utils.Rotate(src, angle, center=None, scale=1.0)[source]

Turn an image in a clockwise or counterclockwise direction.

Parameters:
  • src – original image

  • angle – the value angle for turn the image

  • center – determine the specific coordinate to rotate image

  • scale – scale image

Returns:

rotated image

Return type:

dst image

Ui_Utils.read_image(image_path)[source]

Reading the image from given file path

Parameters:

image_path – image to be read from the image_path

Return type:

img

Ui_Utils.saveImage(filename, image)[source]

Saving images and give a name to store in local directory

Parameters:
  • filename – give the image a filename

  • image – the captured image

Returns:

None

Ui_Utils.drawPoint(image, heightImage, coordinatePoint)[source]

Drawing the dot on the image from the coordinate given

Parameters:
  • image – Image

  • heightImage – to determine the point size in the image

  • coordinatePoint – determine the location of the point in the image

Return type:

image

View_Anypoint

class View_Anypoint.AnyPoint(MainWindow)[source]

Bases: object

Anypoint class to process image on anypoint view

constructed method

connectToButton()[source]

the method for connected function and event on main window user interface.

zoomValue()[source]

The methode to change the zoom value when doing anypoint view.

resetAlphaBeta()[source]

The method for reset alpa, beta, zoom, and angle.

onclickAnypoint()[source]

The method for click button anypoint.

anypoint_view()[source]

The method to clearly process image on anypoint view.

showPolygon()[source]

showing the polygon on original image.

updateParamAnypoint()[source]

The method for update anypoint on the beta, alpha and zoom

anypoint_mode_1()[source]

Determine the anypoint mode 1.

anypoint_mode_2()[source]

Determine the anypoint mode 2.

set_anypoint()[source]

the method for event on click button set anypoint when has modify the parameter.

up()[source]

The method showing anypoint view in specific area.

left()[source]

The method showing anypoint view in specific area.

center()[source]

The method showing anypoint view in specific area.

right()[source]

The method showing anypoint view in specific area.

down()[source]

The method showing anypoint view in specific area.

drawPolygon(image, mapX, mapY)[source]

Draw polygon from mapX and mapY given in the original image. :param image: Original image :param mapX: map image X from anypoint process :param mapY: map image Y from anypoint process

Return type:

image

View_Panorama

class View_Panorama.Panorama(MainWindow)[source]

Bases: object

The class to process image on panorama view :param parent= Main window class :type parent = object

Constructed method.

connectToButton()[source]

This function for connect to button in user interface

set_pano()[source]

This function for setting the maximum and minimum of panorama view

panorama_view()[source]

This function to process image to panorama view.

recenterImage()[source]

Process original image to change the original center image.

positionCoorX()[source]

Change the position coordinate center X on image recenter process

positionCoorY()[source]

Change the position coordinate center Y on image recenter process

updatePossCenter()[source]

Update position center x and y point in the user interface

resetCenter()[source]

This function for reset coordinate x and y.

setCoorCenterObject()[source]

calculate alpha and beta from the original center image.

showOriginalPanorama()[source]

show original image when doing panorama view on the original label.

View_ShowResult

class View_ShowResult.ShowImageResult(MainWindow)[source]

Bases: object

Class to Show Image Result on user interface. :param parent : main window :type parent : -

Constructed method

showInRecenterLabel(image)[source]

show the recenter label to showing the recenter image on UI.

showOriginalImage(imageOri)[source]

Showing the original image in label original image UI.

showPanoAnyImage(image, angle=0)[source]

The method for showing result image after process to panorama or anypoint. :param image: The result image :param angle: the angle if want to rotate the image

Returns:

None

view_result(image)[source]

Show the result image

label_result(resultImage, width_img)[source]

This method is to resize the label result image and show the result image in there.

View_Window

class View_Window.ViewWindow(MainWindow)[source]

Bases: object

Class to control the window in user interface :param parent= Main window :type parent = -

Constructed method.

connectToButton()[source]

The method for connect the function with UI event

show_Maximized()[source]

To showing the result image in maximize window. it will hide the original label image.

show_Minimized()[source]

To showing the result image in minimized window. it will hide the original label image.

hideToolbar()[source]

Hide the toolbar.