sima.operationsο
Attributesο
Classesο
Generic enumeration. |
|
A class for rendering bounding boxes on images using ARM A65 Core. |
|
Functionsο
|
|
|
Set the log level for the PePPi component. |
|
Resize image to the specified width and height using EV74 kernel. |
|
Convert the color space of an image using the EV74's Transform Color Conversion kernel. |
Module Contentsο
- class sima.operations.ColorConversionCodes[source]ο
Generic enumeration.
Derive from this class to define new enumerations.
- class sima.operations.SimaDetessDequant(parser_obj)[source]ο
- class sima.operations.SimaBoxRender[source]ο
A class for rendering bounding boxes on images using ARM A65 Core.
- classmethod render(image: numpy.ndarray, boxes: spy.defines.BoundingBox, frame_width: int, frame_height: int, labelfile: str) numpy.ndarray [source]ο
Renders bounding boxes and labels on the given image.
- Parameters:
image (np.ndarray) β Input image.
boxes (list[BoundingBox]) β List of bounding boxes with attributes (_x, _y, _w, _h, _class_id).
frame_height (int) β Height of the frame.
frame_width (int) β Width of the frame.
label_map_file (str) β Path to the label map file (used only for first-time initialization).
- Returns:
Image with rendered bounding boxes and labels.
- Return type:
np.ndarray
- sima.operations.set_log_level(level: spy.logger.LogLevel)[source]ο
Set the log level for the PePPi component.
This function configures the verbosity of logging for PePPi, controlling which log messages are recorded. Logs are written to the file located at:
/var/log/simaai_peppi.log
.- Parameters:
level (LogLevel) β The desired logging level (e.g., DEBUG, INFO, WARNING, ERROR).
- sima.operations.resize(image, target_width, target_height) numpy.ndarray [source]ο
Resize image to the specified width and height using EV74 kernel.
- Parameters:
image (numpy.ndarray) β The input image as a NumPy array.
target_width (int) β The desired width of the resized image.
target_height (int) β The desired height of the resized image.
- Returns:
The resized image as a NumPy array.
- Return type:
numpy.ndarray
- sima.operations.cvtColor(image, width: int, height: int, color_type: ColorConversionCodes) numpy.ndarray [source]ο
Convert the color space of an image using the EV74βs Transform Color Conversion kernel.
This operation is optimized for performance and leverages hardware acceleration for color conversion.
- Parameters:
image (numpy.ndarray) β The input image as a NumPy array.
width (int) β The width of the image.
height (int) β The height of the image.
color_type (ColorConversionCodes) β The color conversion code indicating the desired color transformation.
- Available color conversion options:
sima.COLOR_BGRTORGB
sima.COLOR_RGBTOBGR
sima.COLOR_BGRTOGRAY
sima.COLOR_RGBTOGRAY
sima.COLOR_IYUVTOBGR
sima.COLOR_IYUVTONV12
sima.COLOR_NV12TOBGR
sima.COLOR_BGRTONV12
sima.COLOR_RGBTONV12
sima.COLOR_NV12TORGB
- Returns:
The image with the converted color space.
- Return type:
numpy.ndarray