API References
Main Package
- Moildev
draw_polygon()
Moildev
Moildev.test()
Moildev.clean()
Moildev.get_Icx()
Moildev.get_Icy()
Moildev.get_imageWidth()
Moildev.get_imageHeight()
Moildev.getAnypointMaps()
Moildev.getPanoramaMaps()
Moildev.anypoint()
Moildev.panorama()
Moildev.reverse_image()
Moildev.getAlphaFromRho()
Moildev.getRhoFromAlpha()
Moildev.get_alpha_beta()
- Plugins
MoilApp
- class Ui_MoilApp.Ui_MainWindow[source]
-
Bases:
object
This class sets up the main window UI for the Moil Software application. It initializes the main window and its widgets, including labels, buttons, and layout configurations.
plugin module
This module defines a base class for creating plugins. Each plugin must inherit from the Plugin class and implement the necessary methods defined in it.
Plugins are expected to perform specific operations as part of a larger application framework. By inheriting from the Plugin base class, plugins are guaranteed to have a consistent interface that the main application can interact with.
- class base_plugin.Plugin[source]
-
Bases:
object
Base class for all plugins.
Each plugin must inherit from this class and implement the required methods. This ensures that all plugins have a consistent interface, making it easier to integrate them into the main application.
- description
-
A brief description of the plugin. Defaults to “UNKNOWN”.
- Type:
-
str
This is the base class that each plugin must inheritance from. Within this class you have to define the methods that all of your plugins must implement.
Lib
- class exif_lib.MetaImage(filename, encoding='utf-8')[source]
-
Bases:
object
Open an image based on the file path. Read and write the metadata of the image. This Library just provide can modify the comment, read the comment and clear the comment in metadata.
Open an image and load its metadata.
- Parameters:
-
-
() (encoding) – The name of image data.
-
() – Convert string to data that can stored on metadata image
-
- read_comment(encoding='utf-8') str [source]
-
This function is for read the comment from metadata Image and return with decode the data to be string.
- Parameters:
-
() (encoding) – Convert string to data that can stored on metadata image
- Returns:
-
The comment data from Metadata Image.
Main
This module defines the main application controller for MoilApp, a software to process fisheye images resulting in panorama and Anypoint views. It includes functions for directory operations, displaying help information, and a main application controller class that manages the UI and plugin interactions.
MoilApp provides a panoramic view that offers a horizontal view in a specific immersed environment to meet common human visual perception. The Anypoint view presents an undistorted image in a certain area according to the input coordinates.
- main.dir_copy(srcpath, dstdir)[source]
-
Copy directory.
- Parameters:
-
-
() (dstdir) – source path or original path folder
-
() – destination directory.
-
- Returns:
-
file copied in destination directory.
- class main.ControllerMainApps(parent=None)[source]
-
Bases:
QMainWindow
The initial class controller Main application to control UI MainWindow.
- Parameters:
-
() (parent) – None
Collection
This module defines the PluginCollection class, which is responsible for discovering and loading plugin modules that inherit from a base Plugin class. The PluginCollection class recursively walks through a specified package to find and instantiate plugin classes.
Plugins are expected to perform specific operations within a larger application framework, ensuring a consistent interface for interaction.
- class plugin_collection.PluginCollection(plugin_package)[source]
-
Bases:
object
Manages the collection of plugins by discovering and loading them from a specified package.
- plugins
-
A list of instantiated plugin objects.
- Type:
-
list
- name_application
-
A list of plugin class names.
- Type:
-
list
- seen_paths
-
A list of paths that have already been scanned for plugins.
- Type:
-
list
- path_folder
-
A list of module paths where plugins were found.
- Type:
-
list
- plugin_package
-
The name of the package to search for plugins.
- Type:
-
str
Upon creation, this class will read the plugins package for modules that contains a class definition that is inheriting from the Plugin class.
- Parameters:
-
() (plugin_package) – The folder name of plugins directory. i.e here is “plugins”
- reload_plugins()[source]
-
Reset the list of all plugins and initiate the walk over the main provided plugin package to load all available plugins.
- Returns:
-
None
API Module
This module defines the ThreadAxisAPI class, which provides an interface for controlling an axis through a serial port. The class includes methods for initializing the axis position, moving the axis, setting speed, and reading the current position. It also handles serial port connections and disconnections and logs all operations.
The logging information is stored in the ‘../log/Axis_control.log’ file.
- class serial_axis_api.ThreadAxisAPI[source]
-
Bases:
object
Provides an interface for controlling an axis via a serial port connection.
- serial_port
-
The serial port to which the axis controller is connected.
- Type:
-
str
- ser
-
The serial connection object for communication with the axis controller.
- Type:
-
serial.Serial
- logger
-
Logger object for logging axis control operations.
- Type:
-
logging.Logger
- absolute_moving(distance)[source]
-
Moving the axis with Absolute motion is the change of position from one absolute place to another.
- Parameters:
-
() (distance) – distance value
- Returns:
-
None
-
Move the axis from one relative place to another.
- Parameters:
-
() (distance) – distance value
- Returns:
-
None
- set_speed(speed)[source]
-
Set the speed value to speed value given by user.
- Parameters:
-
() (speed) – speed value
- Returns:
-
None
Lib
This module contains unit tests for the MetaImage class in the exif_lib module. The tests verify the functionality of modifying, reading, and clearing comments in image metadata using the MetaImage class.
- class test_exif_lib.TestExivlib(methodName='runTest')[source]
-
Bases:
TestCase
Unit tests for the MetaImage class to ensure correct functionality of modifying, reading, and clearing image comments.
- comment
-
The comment to be used in tests for modifying and reading image comments.
- Type:
-
str
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- comment = 'Raspi'
- test_modify_comment()[source]
-
Test the modify_comment method of MetaImage.
This test initializes a MetaImage object with a sample image, modifies the comment in the image metadata, and asserts that the comment was modified correctly.
Moildev
Moildev
This module provides classes and functions for working with MOIL camera calibration data and image processing.
The Moildev class provides methods for initializing the camera parameters, generating maps for remapping fisheye images, and transforming images to create different views.
The draw_polygon function is used to draw a polygon on an image given mapX and mapY coordinates.
- Moildev.Moildev.draw_polygon(image, mapX, mapY)[source]
-
Draw polygon from mapX and mapY given in the original image.
- Parameters:
-
-
image – Original image
-
mapX – map image X from anypoint process
-
mapY – map image Y from anypoint process
-
- Return type:
-
image
- class Moildev.Moildev.Moildev(parameter_path, camera_type)[source]
-
Bases:
object
This is the initial configuration that you need provide the parameter. The camera parameter is the result from calibration camera by MOIL laboratory. before the successive functions can work correctly,configuration is necessary in the beginning of program.
- Parameters:
-
-
() (camera_type)
-
()
-
for more detail, please reference https://github.com/MoilOrg/moildev
- getAnypointMaps(alpha, beta, zoom, mode=1)[source]
-
The purpose is to generate a pair of X-Y Maps for the specified alpha, beta and zoom parameters, the result X-Y Maps can be used later to remap the original fisheye image to the target angle image.
:param : param alpha: alpha :param : type alpha: float :param : param beta: beta :param : type beta: float :param : param zoom: decimal zoom factor, normally 1..12 :param : type zoom: int :param : param mode: selection anypoint mode(1 or 2) :param : type mode: int
- Returns:
-
return: map_x, map_y :rtype: float
Examples
please reference: https://github.com/MoilOrg/moildev
- getPanoramaMaps(alpha_min, alpha_max)[source]
-
To generate a pair of X-Y Maps for alpha within 0..alpha_max degree, the result X-Y Maps can be used later to generate a panorama image from the original fisheye image..
:param : param alpha_min: alpha min :param : type alpha_min: float :param : param alpha_max: alpha max :param : type alpha_max: float
- Returns:
-
return: pair maps x-y :rtype: array
Examples
please reference: https://github.com/MoilOrg/moildev
- anypoint(image, alpha, beta, zoom, mode=1)[source]
-
Generate anypoint view.for mode 1, the result rotation is betaOffset degree rotation around the Z-axis(roll) after alphaOffset degree rotation around the X-axis(pitch). for mode 2, The result rotation is thetaY degree rotation around the Y-axis(yaw) after thetaX degree rotation around the X-axis(pitch).
:param : param image: source image :param : type image: array :param : param alpha: alpha :param : type alpha: float :param : param beta: beta :param : type beta: float :param : param zoom: zoom :param : type zoom: int :param : param mode: mode anypoint view :param : type mode: int
- Returns:
-
return: anypoint view :rtype: array
Examples
please reference: https://github.com/MoilOrg/moildev
- panorama(image, alpha_min, alpha_max)[source]
-
The panorama image centered at the 3D direction with alpha = iC_alpha_degree and beta = iC_beta_degree
:param : param image: Original image :param : type image: array :param : param alpha_min: min of alpha. by default it 10 degree. :param : type alpha_min: float :param : param alpha_max: max of alpha. The recommended value is half of camera FOV. For example, use
90 for a 180 degree fisheye images and use 110 for a 220 degree fisheye images.
:param : type alpha_max: float
- Returns:
-
return: panorama image :rtype: array
Examples
please reference: https://github.com/MoilOrg/moildev
- reverse_image(image, alpha_max, alpha, beta)[source]
-
To generate the image reverse image from panorama that can change the focus direction from the original images. The panorama reverse image centered at the 3D direction with alpha_max = max of alpha and beta = iC_beta_degree.
:param : param image: source image :param : type image: array :param : param alpha_max: alpha max :param : type alpha_max: float :param : param alpha: alpha :param : type alpha: float :param : param beta: beta :param : type beta: float
- Returns:
-
return: reverse view image :rtype: array
Examples
please reference: https://github.com/MoilOrg/moildev
- getAlphaFromRho(rho)[source]
-
Get the alpha from rho image.
:param : param rho: rho image :param : type rho: int
- Returns:
-
return: alpha :rtype: float
Examples
please reference: https://github.com/MoilOrg/moildev
- getRhoFromAlpha(alpha)[source]
-
Get rho image from alpha given.
:param : param alpha:alpha :param : type alpha: float
- Returns:
-
return: rho image :rtype: int
Examples
please reference: https://github.com/MoilOrg/moildev
- get_alpha_beta(coordinateX, coordinateY, mode=1)[source]
-
Get the alpha beta from specific coordinate image.
:param : param mode: the anypoint mode. :param : type mode: int :param : param coordinateX: the coordinate point X axis. :param : type coordinateX: int :param : param coordinateY: the coordinate point Y axis. :param : type coordinateY: int
- Returns:
-
return: alpha, beta :rtype: float
Examples
please reference: https://github.com/MoilOrg/moildev
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
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.
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.
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.
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:
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.
- videoButtonDisable()[source]
-
This method has function to disable the buttons control video when not in video mode.
Returns:
Default
- Controller
- Addition
- Window
- Image
- Camera
- Show Result
- Video
controller
VideoController
VideoController.connectToButton()
VideoController.videoButtonDisable()
VideoController.videoButtonEnable()
VideoController.videoButtonCamera()
VideoController.reset_time()
VideoController.videoPlayPouse()
VideoController.play_video()
VideoController.pause_video()
VideoController.stop_video()
VideoController.stop_camera()
VideoController.prev_video()
VideoController.skip_video()
VideoController.changeValue()
VideoController.controller()
VideoController.recordVideo()
VideoController.selectDir()
- Windows
- Image
- Anypoint
AnyPoint
AnyPoint.connectToButton()
AnyPoint.control_button_on_anypoint()
AnyPoint.control_button_off_anypoint()
AnyPoint.zoomValue()
AnyPoint.resetAlphaBeta()
AnyPoint.onclickAnypoint()
AnyPoint.anypoint_view()
AnyPoint.showPolygon()
AnyPoint.updateParamAnypoint()
AnyPoint.anypoint_mode_1()
AnyPoint.anypoint_mode_2()
AnyPoint.set_anypoint()
AnyPoint.up()
AnyPoint.left()
AnyPoint.center()
AnyPoint.right()
AnyPoint.down()
- Panorama
Panorama
Panorama.connectToButton()
Panorama.control_button_on_panorama()
Panorama.control_button_of_panorama()
Panorama.set_panorama()
Panorama.panorama_view()
Panorama.recenterImage()
Panorama.positionCoorX()
Panorama.positionCoorY()
Panorama.updatePossCenter()
Panorama.resetCenter()
Panorama.setCoorCenterObject()
Panorama.showOriginalPanorama()
- Anypoint
Main
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'
- open_video_file()[source]
-
Load video file from local directory using file open dialog.
- Returns:
-
Video.
- 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:
- 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.
-
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.
- help()[source]
-
showing the message box to show help information obout this application.
- Returns:
-
None.
Windows
Open Camera
Main Window
Image
Anypoint
- class plugins.default.view_image.anypoint.AnyPoint(MainWindow)[source]
-
Bases:
object
Anypoint class to process image on anypoint view.
- Parameters:
-
() (MainWindow) – Is the parent class to access the user interface widget in this application.
- connectToButton()[source]
-
The method for connected function and event on main window user interface.
- Returns:
-
None.
- control_button_on_anypoint()[source]
-
Control button on anypoint where it will be hide and show the button.
- Returns:
-
None.
- control_button_off_anypoint()[source]
-
Control button off anypoint where it will be hide and show the button.
- Returns:
-
None.
- updateParamAnypoint()[source]
-
The method for update parameter beta, alpha and zoom on the user interface.
- Returns:
-
None.
Panorama
- class plugins.default.view_image.panorama.Panorama(MainWindow)[source]
-
Bases:
object
The class to process image ang generate panorama view.
- Parameters:
-
() (MainWindow) – Is the parent class to access the user interface widget in this application.
- connectToButton()[source]
-
This function for connect to button in user interface
- Returns:
-
Process button event
- control_button_on_panorama()[source]
-
Control the button show or hide on panorama mode.
- Returns:
-
None.
- control_button_of_panorama()[source]
-
Control the button show or hide after you’re not in panorama mode.
Returns:
Plugins
- Inspection
- Controller
- Help
- Source
- Image
- Inspection Tools
- Inspection View
- Widgets
- Main
Controller
Controller.resized
Controller.camera_parameter
Controller.connect_event()
Controller.open_image()
Controller.connect_to_moildev()
Controller.onclick_load_video()
Controller.select_camera_type()
Controller.dialog_camera_oke()
Controller.onclick_open_camera_button()
Controller.open_cam_params_window()
Controller.open_camera()
Controller.running_video()
Controller.show_normal()
Controller.show_to_window()
Controller.help()
Controller.save_image()
Controller.addWidget()
Controller.saved_image_activated()
Controller.selectDir()
Controller.reset_mode_view()
Controller.go_to_home_application()
Controller.onclick_exit()
Controller.resizeEvent()
Controller.closeEvent()
Internal_Inspection
- Default
- Controller
- Windows
- Image
- Main
- Controller
Controller
Controller.camera_parameter
Controller.connect_button()
Controller.open_image()
Controller.open_video_file()
Controller.onclick_open_camera()
Controller.cameraOpen()
Controller.next_frame_slot()
Controller.init_ori_ratio()
Controller.getCenterWindowsOri()
Controller.mouse_event()
Controller.mouseDoubleclick_event()
Controller.mouse_wheelEvent()
Controller.mouseMovedOriImage()
Controller.mouseMovedResultImage()
Controller.mouse_release_event()
Controller.menuMouseEvent()
Controller.saveImage()
Controller.selectDir()
Controller.aboutUs()
Controller.help()
Controller.back_to_home()
Controller.exit()
Controller.closeEvent()
Controller
Event
- class plugins.Thread_inspection.controller.mouse_control_event.MouseController(Parent)[source]
-
Bases:
object
Mouse event controller. :param Parent (): The main class of this application
- 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:
- 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.
-
showing the menu image when release right click.
- Parameters:
-
() (e)
- Returns:
-
None.
- mouseMovedOriImage(e)[source]
-
Mouse move event to look in surrounding view in result label image.
- Parameters:
-
() (e)
Returns:
Camera
- plugins.Thread_inspection.controller.select_source_camera.check_Port_USB_Camera()[source]
-
Detect the USB camera port available and show it on message box prompt.
Returns:
- class plugins.Thread_inspection.controller.select_source_camera.OpenCameraSource(Parent, RecentWindow)[source]
-
Bases:
Ui_Dialog
Create class controller open camera with inheritance from Ui Dialog Class.
- Parameters:
-
-
() (RecentWindow)
-
()
-
- camera_source_used()[source]
-
This function will return the source of camera used depend on what the camera use.
- Returns:
-
camera source
Serial Controller
- plugins.Thread_inspection.controller.serial_controller.getPassword()[source]
-
Get password from input dialog.
- class plugins.Thread_inspection.controller.serial_controller.AxisController(Parent)[source]
-
Bases:
object
Axis controller class.
- Parameters:
-
() (Parent) – The main class of this application
-
axis will move with related moving forward which the value is plus.
-
axis will move with related moving backward which the value is minus.
Video Controller
Help
Main Help
Source
parameters
- class plugins.Thread_inspection.parameter_source.camera_parameters.CameraParameters(Parent, RecentWindow)[source]
-
Bases:
Ui_Dialog
Create class controller open camera with inheritance from Ui Dialog Class.
- Parameters:
-
-
() (RecentWindow) – the main class of this application
-
() – The windows displayed now
-
- list_cam_available()[source]
-
Provides information about parameters that have been save in the application
Image
image.anypoint
Image.panorama
Inspection
- Controller
- Event
MouseController
MouseController.mouse_event()
MouseController.mouseDoubleclick_event()
MouseController.mouse_wheelEvent()
MouseController.mouse_wheelEvent_ori_label()
MouseController.mouse_release_event()
MouseController.menuMouseEvent()
MouseController.mouseMovedOriImage()
MouseController.init_ori_ratio()
MouseController.init_result_ratio()
- Camera
- Serial
Controller
getPassword()
AxisController
AxisController.open_axis_controller()
AxisController.set_speed_axis()
AxisController.go_connect_serial()
AxisController.go_disconnect_serial()
AxisController.go_reset()
AxisController.go_absolute_moving()
AxisController.go_related_moving_forward()
AxisController.go_related_moving_backward()
AxisController.help_axis_controller()
- Video Controller
- Event
- Help
- Source
- parameters
CameraParameters
CameraParameters.connect_event()
CameraParameters.list_cam_available()
CameraParameters.handle_combo_box()
CameraParameters.delete_camera_param()
CameraParameters.update_params()
CameraParameters.add_new_params()
CameraParameters.clear_all()
CameraParameters.get_params_from_form()
CameraParameters.close_dialog()
- parameters
- Image
- Inspection Tools
- Inspection View
- Widgets
Main
- class plugins.Thread_inspection.main.Controller(main_application)[source]
-
Bases:
QMainWindow
This Class is for control the widget event to the execute function.
- Parameters:
-
-
() (main_application) – This argument send QWidget from main application.
-
class (which is can access the function and variable from that)
-
class
-
- resized
-
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
-
pyqtSignal(*types, name
- Type:
-
str = …, revision
- camera_parameter = 'camera_parameters/camera_parameters.json'
- connect_event()[source]
-
Connect every event on user interface like button event, mouse event and etc to the function processing.
- open_image()[source]
-
Open Dialog to search the file image from directory. This function also will read the comment from metadata image.
- connect_to_moildev()[source]
-
Connect to Moildev SDK, need provide camera parameter database and type of camera.
- onclick_load_video()[source]
-
Open Dialog to search video file from Directory. after you select the video file, it will show the prompt to select the type of camera.
- dialog_camera_oke()[source]
-
The function will execute when you press accept or ok in dialog camera type selection.
- open_cam_params_window()[source]
-
Open the window of camera parameter form, this window you can update, add, and delete the camera parameter from database.
- open_camera()[source]
-
open the camera from the available source in the system, this function provide 2 source namely USB cam and Streaming Cam from Raspberry pi.
- running_video(video_source)[source]
-
Open Video following the source given.
- Parameters:
-
() (video_source) – the source of media, can be camera and video file.
- save_image()[source]
-
Save image into local directory, it can save original image or result image from panorama or anypoint processing.
- addWidget(image)[source]
-
Add the image widget in the list view of saved image. it can be reopen when you select. :param image (): the image saved.
- saved_image_activated()[source]
-
Function that for connect with the event in list widget to reopen the image.
- 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.
Inspection Tools
inspection.tools.utils module
- plugins.Thread_inspection.tools.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
-
- Returns:
-
location
- Return type:
-
file_path
- plugins.Thread_inspection.tools.utils.resize_image(image, width)[source]
-
Resize image original with our size we want
- Parameters:
-
-
() (width) – image original
-
() – image width we want
-
- Returns:
-
image has been resize
- Return type:
-
result
- plugins.Thread_inspection.tools.utils.calculate_height(image, image_width)[source]
-
Calculate the height image with the same ratio with the size original image.
- Parameters:
-
-
image – original image
-
image_width – size image we want
-
- Returns:
-
height image
- Return type:
-
height
- plugins.Thread_inspection.tools.utils.read_image(image_path)[source]
-
Reading the image from given file path using openCV.
- Parameters:
-
image_path – The path of image file
- Returns:
-
load image
- Return type:
-
Image
- plugins.Thread_inspection.tools.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
Inspection View
Frame
View
Widgets
- class plugins.Thread_inspection.view.show_to_widgets.ShowImage(Parent)[source]
-
Bases:
object
Class for control the showing image on user interface.
- Parameters:
-
() (Parent) – the main class of this application.