Controller

InitMoildev

class InitMoildev.Config(filename)[source]

Bases: object

Reading the parameter camera from *.json file

Constructor method :param filename = .json file: :param filename = dictionary:

Returns:

camera name camera sensor width camera sensor height iCx iCy ratio image width image height calibration ratio parameter0 parameter1 parameter2 parameter3 parameter4 parameter5

get_cameraName()[source]

get camera name

get_sensorWidth()[source]

get sensor width

get_sensor_height()[source]

get sensor height

get_Icx()[source]

get center image in X axis

get_Icy()[source]

get center image in Y axis

get_ratio()[source]

get ratio image

get_imageWidth()[source]

get image width

get_imageHeight()[source]

get image height

get_calibrationRatio()[source]

get calibration ratio

get_parameter0()[source]

get parameter 0

get_parameter1()[source]

get parameter 1

get_parameter2()[source]

get parameter 2

get_parameter3()[source]

get parameter 3

get_parameter4()[source]

get parameter 4

get_parameter5()[source]

get parameter 5

initAlphaRho_Table()[source]

create list for initial alpha to rho(height image)

getAlphaFromRho(rho)[source]

return the alpha from rho image

getRhoFromAlpha(alpha)[source]

return rho image from alpha given

get_alpha_beta(mode, delta_x, delta_y)[source]

calculate the alpha beta from specific coordinate image. :param mode = the anypoint mode.: :param mode = integer.: :param delta_x = the coordinate point in quadrant 1 X axis.: :param delta_x = integer.: :param delta_y = the coordinate point in quadrant 1 Y axis.: :param delta_y = integer.:

Returns:

alpha beta.

OpenCam

class OpenCam.Ui_Dialog(*args: Any, **kwargs: Any)[source]

Bases: QWidget

This class is to create window for selecting camera _source

setupUi(Dialog)[source]
retranslateUi(Dialog)[source]

OpenCamera

class OpenCamera.OpenCameras(*args: Any, **kwargs: Any)[source]

Bases: Ui_Dialog

This class is to control the window selecting camera. :param MainWindow = Is the parent class window. :type MainWindow = QtWidget of mainWindow UI. :param recentWindow = is the object of this recent window. :type recentWindow = QtDialog inheritance from mainWindow class.

Constructor method. *this is the way to make the ui can link each other.

connect_to_button()[source]

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

handle_activated_combobox()[source]

This function is to handle combo box to select _source camera. - 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

check_port_camera()[source]

Check the camera usb that available in computer

Returns:

will showing the port camera available

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

RatioImage

class RatioImage.Set_RatioImage(MainWindow)[source]

Bases: object

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

:param parent= MainWindow of User Interface :type parent = QtWidget object

Constructor Method

resize_original_image(image)[source]

resize image for showing on Label original image user interface

Parameters:
  • image (image = original)

  • array (image =)

Returns:

Resized image

resize_result_image(image, width_image)[source]

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

Parameters:
  • array (image =)

  • integer (width_image =)

Returns:

Resized image

Video Controller

class VideoControler.Video_Controler(Mainwindow)[source]

Bases: object

The class to control the video. this class also inheritance from mainwindow class. :param parent : main window class :type : -

Constructor method

connectToButton()[source]

This functions to connect each button on the user interface

videoButtonDisable()[source]

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

videoButtonEnable()[source]

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

videoButtonCamera()[source]

Control the video controller when in camera mode

reset_time()[source]

Reset the time when open the new video.

videoPlayPouse()[source]

Control play and pause when playing video or camera.

play_video()[source]

Play video.

pause_video()[source]

Pause video.

stop_video()[source]

Stop Video.

stop_camera()[source]

Stop camera and clear label view.

prev_video()[source]

Previous video in 5 second.

skip_video()[source]

skip video in 5 second.

changeValue(value)[source]

Control slider time video.

controler()[source]

Manage the video to setup the current timer.

recordVideo()[source]

Create video writer to save video.

selectDir()[source]

Select destination directory to save the video file.