Default

Main

class plugins.default.main.DefaultApps[source]

Bases: Plugin

The class that represent the plugins application, class name will be read as the name of application.

perform_operation(argument)[source]

The main application will execute this function when click button open.

Parameters:

() (argument) – is the object widget from main application class.

Returns:

Will show the window of application.

Controller

class plugins.default.ui_controller.Controller(MainWindow)[source]

Bases: QMainWindow

The controller class to control UI MainWindow.

Parameters:

() (MainWindow) – Its object window from parent application(argument from main apps)

camera_parameter = 'camera_parameters/camera_parameters.json'
connect_button()[source]

Connect the button and event to the function.

Returns:

open_image()[source]

Load image from directory using file open dialog.

Returns:

Image.

open_video_file()[source]

Load video file from local directory using file open dialog.

Returns:

Video.

onclick_open_camera()[source]

Showing the window to select the source camera.

Returns:

None.

cameraOpen()[source]

Open camera following the source given. the source has 2 choice which is usb camera and url camera raspberry pi. we have to running the server on raspberry to use the url camera.

Returns:

Camera open.

next_frame_slot()[source]

Control video frame, Its will Lopping the frame following the timer.

Returns:

None

init_ori_ratio()[source]

Calculate the initial ratio of the image.

Returns:

ratio width between image and ui window. ratio_y : ratio height between image and ui window. center : find the center image on window user interface.

Return type:

ratio_x

getCenterWindowsOri()[source]

Get the center coordinate on label windows original.

Returns:

center coordinate

mouse_event(e)[source]

Specify coordinate from mouse left event to generate anypoint view and recenter image.

Parameters:

() (e) – Coordinate point return by pyqt core

Returns:

mouseDoubleclick_event(e)[source]

Reset to default by mouse event.

Parameters:

() (e)

Returns:

mouse_wheelEvent(e)[source]

Resize image using mouse wheel event.

Parameters:

() (e)

Returns:

mouseMovedOriImage(e)[source]

Mouse move event to look in surrounding view in result label image.

Parameters:

() (e)

Returns:

mouseMovedResultImage(e)[source]

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

Parameters:

() (e)

Returns:

mouse_release_event(e)[source]

Mouse release event right click to show menu. the menu can select is show maximum, show minimum, save image, and show info.

Parameters:

() (e)

Returns:

None.

menuMouseEvent(e)[source]

showing the menu image when release right click.

Parameters:

() (e)

Returns:

None.

saveImage()[source]

Save image on local directory. the first time you save image, it will open dialog to select the directory, then the image saved will always stored on directory selected.

Returns:

None.

selectDir()[source]

Select directory to save image. This function create to make it not always ask the directory by open dialog, after directory save not None, it will pass open dialog prompt.

Returns:

None.

aboutUs()[source]

Showing prompt About us information (MOIL LAB).

Returns:

None.

help()[source]

showing the message box to show help information obout this application.

Returns:

None.

back_to_home()[source]

This function is for back to main windows, because we just hide the main window so it possible to show the main window following the event given.

Returns:

None.

exit()[source]

Exit the apps with showing the QMessageBox.

Returns:

None.

closeEvent(event)[source]

Control exit application by ask yes or no question.

Parameters:

() (event) – when you click the icon (x) or exit button

Returns:

destroy the window.