NullCamera

class NullCamera[source]

Bases: object

__init__()

Methods

Attributes

area1: list[int] = []
area2: list[int] = []
area3: list[int] = []
area4: list[int] = []
areas: list[list[int]] = []
area1_is_triggered: bool = False
area2_is_triggered: bool = False
area3_is_triggered: bool = False
area4_is_triggered: bool = False
change: bool = False
annotation: str = ''
path_picture: str = ''
error: str = 'Error connecting to the camera '
trial: int = -1
is_recording: bool = False
timing: int = 0
x_position: int = -1
y_position: int = -1
trigger_event = <threading.Event at 0x7f52ff385990: unset>
items_to_draw: dict[str, Any]
start_camera() None[source]

Starts the camera.

stop_camera() None[source]

Stops the camera.

start_preview_window() <MagicMock name='mock.QWidget' id='139994447312848'>[source]

Starts the preview window.

Returns:

A QWidget for the preview.

Return type:

QWidget

stop_preview_window() None[source]

Stops the preview window.

start_recording(path_video: str = '', path_csv: str = '') None[source]

Starts recording.

Parameters:
  • path_video (str) – Path for video file.

  • path_csv (str) – Path for CSV data.

stop_recording() None[source]

Stops recording.

print_info_about_config() None[source]

Prints camera configuration info.

pre_process(request) None[source]

Preprocessing callback for frames.

Parameters:

request – The request object.

write_text(text: str) None[source]

Writes text annotation to the frame.

Parameters:

text (str) – The text to write.

areas_corridor_ok() bool[source]

Checks corridor areas status.

Returns:

True if OK.

Return type:

bool

area_1_empty() bool[source]

Checks if area 1 is empty.

Returns:

True if empty.

Return type:

bool

area_2_empty() bool[source]

Checks if area 2 is empty.

Returns:

True if empty.

Return type:

bool

area_3_empty() bool[source]

Checks if area 3 is empty.

Returns:

True if empty.

Return type:

bool

area_4_empty() bool[source]

Checks if area 4 is empty.

Returns:

True if empty.

Return type:

bool

take_picture() None[source]

Takes a picture.