Mech-DLK SDK (C++) 3.0.0
Mech-DLK SDK (C++) Reference Documentation
 
Loading...
Searching...
No Matches
mmind::dl::MMindImage Struct Reference

Represents an image structure for inference and visualization. More...

#include <MMindImage.h>

Public Member Functions

StatusCode createFromPath (const std::string &imagePath)
 Creates an image by loading from a file path.
 
StatusCode show (const std::string &winName) const
 Displays the image in a window.
 
StatusCode save (const std::string &savePath) const
 Saves the image to the specified file path.
 

Public Attributes

uint32_t width {0}
 Image width in pixels.
 
uint32_t height {0}
 Image height in pixels.
 
size_t bytesPerRow {0}
 Number of bytes per row (stride/pitch)
 
std::shared_ptr< const void > data
 Pointer to image pixel data (BGR format, row-major)
 

Detailed Description

Represents an image structure for inference and visualization.

This structure provides a unified image representation for the inference engine, containing both image metadata and pixel data. It supports image loading from files or other data format, visualization, and saving operations.

See also
MMindInferEngine For inference usage

Definition at line 49 of file MMindImage.h.

Member Function Documentation

◆ createFromPath()

StatusCode mmind::dl::MMindImage::createFromPath ( const std::string & imagePath)

Creates an image by loading from a file path.

Parameters
[in]imagePathPath to the image file (supports common formats: .jpg, .png, .bmp, etc.)
Returns
See StatusCode for details.
Note
The image is loaded in BGR format with 3 channels by default.

◆ save()

StatusCode mmind::dl::MMindImage::save ( const std::string & savePath) const

Saves the image to the specified file path.

Parameters
[in]savePathDestination path for saving the image. Format is determined by file extension.
Returns
See StatusCode for details.
Note
Supported formats: .jpg, .png, .bmp, .tiff

◆ show()

StatusCode mmind::dl::MMindImage::show ( const std::string & winName) const

Displays the image in a window.

Parameters
[in]winNameName of the window to display the image.
Returns
See StatusCode for details.
Note
The window size automatically matches the image dimensions. Press any key to close the window.

Member Data Documentation

◆ bytesPerRow

size_t mmind::dl::MMindImage::bytesPerRow {0}

Number of bytes per row (stride/pitch)

Definition at line 80 of file MMindImage.h.

80{0};

◆ data

std::shared_ptr<const void> mmind::dl::MMindImage::data

Pointer to image pixel data (BGR format, row-major)

Definition at line 81 of file MMindImage.h.

◆ height

uint32_t mmind::dl::MMindImage::height {0}

Image height in pixels.

Definition at line 79 of file MMindImage.h.

79{0};

◆ width

uint32_t mmind::dl::MMindImage::width {0}

Image width in pixels.

Definition at line 78 of file MMindImage.h.

78{0};

The documentation for this struct was generated from the following file: