Controller

Addition

plugins.default.contoller.addition.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

plugins.default.contoller.addition.draw_point(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

plugins.default.contoller.addition.save_image(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

Window

class plugins.default.contoller.control_window.ViewWindow(MainWindow)[source]

Bases: object

Initial Class to control the window in user interface.

Parameters:

() (MainWindow) – Is the parent class to access the user interface widget in this application.

connectToButton()[source]

The method for connect the function with UI event

Returns:

The event will connect to function.

showMaximized()[source]

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

Returns:

showing image on Maximum windows.

show_Minimized()[source]

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

Returns:

Showing the minimum windows.

hideToolbar()[source]

Hide the toolbar from main window.

Returns:

toolbar hidden.

Image

class plugins.default.contoller.resize_image.ResizeImage(MainWindow)[source]

Bases: object

Initial class setting ratio image To solve the ratio image problem where using the various of camera type.h

Parameters:

() (MainWindow) – Is the parent class to access the user interface widget in this application.

resize_original_image(image)[source]

resize image for showing on Label original image user interface

Parameters:

() (image) – original input image

Returns:

Resized image.

resize_result_image(image, width_image)[source]

Resize result image and the label result image based on width given.

Parameters:
  • () (width_image)

  • ()

Returns:

None.

Camera

plugins.default.contoller.select_cam.check_port_camera()[source]

Check the camera usb that available in computer

Returns:

will showing the port camera available

class plugins.default.contoller.select_cam.OpenCameras(MainWindow, recentWindow)[source]

Bases: Ui_Dialog

This class is to control the window selecting camera.

Parameters:
  • () (recentWindow) – Is the parent class window. QtWidget of mainWindow UI

  • () – is the object of this recent window.

  • class. (it is QtDialog object inheritance from mainWindow)

connect_to_button()[source]

This is for connect the button or event with class function.

Returns:

None.

handle_activated_combobox()[source]

This function is to handle combo box to select source camera.

Returns:

if select USB Camera then it will hide the object UI for streaming camera. On the other hand, if you choose a streaming camera, it will hide the component object UI for the USB camera.

video_source()[source]

To select the video source want to use

Returns:

videoStreamURL

push_button_ok()[source]

To process the final decisions the open camera.

Returns:

Execute open camera function.

exit()[source]

Exit open camera window when reject the choice

Returns:

close the window.

Show Result

plugins.default.contoller.showResult.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

class plugins.default.contoller.showResult.ShowImageResult(MainWindow)[source]

Bases: object

Class to Show Image Result on user interface.

Parameters:

() (MainWindow)

showInRecenterLabel(image)[source]

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

Parameters:

() (image)

Returns:

None.

showOriginalImage(imageOri)[source]

Showing the original image in label original image UI.

Parameters:

() (imageOri)

Returns:

showPanoAnyImage(image, angle=0)[source]

The method for showing result image after process to panorama or anypoint.

Parameters:
  • image – The result image

  • angle – the angle if want to rotate the image

Returns:

None

view_result(image)[source]

Show the result image.

Parameters:

() (image)

Returns:

label_result(resultImage, width_img)[source]

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

Parameters:
  • () (width_img)

  • ()

Returns:

Video controller

class plugins.default.contoller.videocontroller.VideoController(Mainwindow)[source]

Bases: object

The class to control the video. this class also inheritance from mainwindow class.

Parameters:

() (Mainwindow) – Is the parent class to access the user interface widget in this application.

connectToButton()[source]

This functions to connect each button on the user interface.

Returns:

videoButtonDisable()[source]

This method has function to disable the buttons control video when not in video mode.

Returns:

videoButtonEnable()[source]

This method has function to enable the buttons control video when in video mode.

Returns:

videoButtonCamera()[source]

Control the video controller when in camera mode.

Returns:

reset_time()[source]

Reset the time when open the new video.

Returns:

videoPlayPouse()[source]

Control play and pause when playing video or camera.

Returns:

play_video()[source]

Play video.

Returns:

pause_video()[source]

Pause video.

Returns:

stop_video()[source]

Stop Video.

Returns:

stop_camera()[source]

Stop camera and clear label view.

Returns:

prev_video()[source]

Previous video in 5 second.

Returns:

skip_video()[source]

skip video in 5 second.

Returns:

changeValue(value)[source]

Control slider time video.

Parameters:

() (value)

Returns:

controller()[source]

Manage the video to setup the current timer.

Returns:

recordVideo()[source]

Create video writer to save video.

Returns:

selectDir()[source]

Select destination directory to save the video file.

Returns: