Skip to content

View Gui

This module contains the view panel for the camera feed.

ATTRIBUTE DESCRIPTION
BUTTON_HEIGHT

Button height

TYPE: int

BUTTON_WIDTH

Button width

TYPE: int

CLASS DESCRIPTION
View

Protocol for the view panel

ViewPanel

View panel for the camera feed

Documentation last updated: 2025-02-22

ViewPanel

ViewPanel(principal: View | Proxy | None = None)

Bases: Panel

View panel for the camera feed

ATTRIBUTE DESCRIPTION
fps

Frames per second

TYPE: int | float

size

Frame size

TYPE: tuple[int, int]

is_connected

Connection status

TYPE: bool

is_connected_previous

Previous connection status

TYPE: bool

is_frozen

Freeze status

TYPE: bool

latest_frame

Latest frame

TYPE: ndarray | None

latest_image

Latest image as a PIL Image

TYPE: Image | None

tk_image

Latest image as a Tkinter image

TYPE: PhotoImage | None

loaded_filename

Loaded filename

TYPE: str

last_visited_load_dir

Last visited directory for loading files

TYPE: str

last_visited_save_dir

Last visited directory for saving files

TYPE: str

button_height

Button height

TYPE: int

button_width

Button width

TYPE: int

METHOD DESCRIPTION
updateStream

Update the stream

refresh

Refresh the view

addTo

Add the view to the master widget

getSaveDirectory

Get the directory to save the image

save

Save the current image

load

Load an image file

toggleConnect

Toggle connection to the feed

toggleFreeze

Toggle the freeze state

connect

Connect to the feed

disconnect

Disconnect from the feed

getFrame

Get the next frame

Initialize the view panel

PARAMETER DESCRIPTION
principal

The principal object for the view panel

TYPE: View | Proxy | None DEFAULT: None

latest_image property

latest_image: Image | None

Latest image as a PIL Image

connect

connect()

Connect to the feed

disconnect

disconnect()

Disconnect from the feed

getFrame

getFrame()

Get the next frame

getSaveDirectory

getSaveDirectory()

Get the directory to save the image

load

load()

Load an image file

save

save()

Save the current image

toggleConnect

toggleConnect()

Toggle connection to the feed

toggleFreeze

toggleFreeze()

Toggle the freeze state