BackgroundColoredVMobjectDisplayer
(camera)[source]¶Bases: object
camera (Camera) – Camera object to use.
Methods
Displays the colored VMobjects. |
|
Gets the background array that has the passed file_name. |
|
|
|
Resizes the pixel array representing the background. |
|
Resizes the background array to match the passed pixel array. |
display
(*cvmobjects)[source]¶Displays the colored VMobjects.
*cvmobjects (VMobject) – The VMobjects
The pixel array with the cvmobjects displayed.
np.array
get_background_array
(file_name)[source]¶Gets the background array that has the passed file_name.
file_name (str) – The file_name of the background image.
The pixel array of the file whose file name is file_name
np.ndarray
resize_background_array
(background_array, new_width, new_height, mode='RGBA')[source]¶Resizes the pixel array representing the background.
background_array (np.array) – The pixel
new_width (int, float) – The new width of the background
new_height (int, float) – The new height of the background
mode (str, optional) – The PIL image mode, by default “RGBA”
The numpy pixel array of the resized background.
np.array
resize_background_array_to_match
(background_array, pixel_array)[source]¶Resizes the background array to match the passed pixel array.
background_array (np.array) – The prospective pixel array.
pixel_array (np.array) – The pixel array whose width and height should be matched.
The resized background array.
np.array