#include <CropAdapter.h>
|
| static std::vector< std::filesystem::path > | cropImages (const std::string &imagePath, const std::vector< ports::Rect > &rects, const std::filesystem::path &outputDir, ports::CropRequest::OutputFormat fmt, int jpegQuality=92, std::shared_ptr< core::ports::diagnostics::IDiagnostics > debugger=nullptr, const std::string &filePrefix="") |
| | Crops multiple rectangles from an image file and writes the results to disk.
|
| static std::vector< std::filesystem::path > | cropImages (const cv::Mat &img, const std::vector< ports::Rect > &rects, const std::filesystem::path &outputDir, ports::CropRequest::OutputFormat fmt, int jpegQuality=92, std::vector< std::vector< uint8_t > > *outBytes=nullptr, std::shared_ptr< core::ports::diagnostics::IDiagnostics > debugger=nullptr, const std::string &filePrefix="") |
| | Crops multiple rectangles from an in-memory image.
|
Definition at line 20 of file CropAdapter.h.
◆ cropImages() [1/2]
| std::vector< std::filesystem::path > opencv::CropAdapter::cropImages |
( |
const cv::Mat & | img, |
|
|
const std::vector< ports::Rect > & | rects, |
|
|
const std::filesystem::path & | outputDir, |
|
|
ports::CropRequest::OutputFormat | fmt, |
|
|
int | jpegQuality = 92, |
|
|
std::vector< std::vector< uint8_t > > * | outBytes = nullptr, |
|
|
std::shared_ptr< core::ports::diagnostics::IDiagnostics > | debugger = nullptr, |
|
|
const std::string & | filePrefix = "" ) |
|
static |
Crops multiple rectangles from an in-memory image.
- Parameters
-
| img | The source image. |
| rects | The crop rectangles in source-image coordinates. |
| outputDir | The output directory for generated crops. |
| fmt | The desired output image format. |
| jpegQuality | The JPEG quality to use when encoding JPG output. |
| outBytes | Optional sink for encoded crop bytes. |
| debugger | Optional debugger used for trace output. |
| filePrefix | Optional prefix for generated filenames. |
- Returns
- The list of written crop file paths.
Definition at line 36 of file CropAdapter.cpp.
◆ cropImages() [2/2]
| std::vector< std::filesystem::path > opencv::CropAdapter::cropImages |
( |
const std::string & | imagePath, |
|
|
const std::vector< ports::Rect > & | rects, |
|
|
const std::filesystem::path & | outputDir, |
|
|
ports::CropRequest::OutputFormat | fmt, |
|
|
int | jpegQuality = 92, |
|
|
std::shared_ptr< core::ports::diagnostics::IDiagnostics > | debugger = nullptr, |
|
|
const std::string & | filePrefix = "" ) |
|
static |
Crops multiple rectangles from an image file and writes the results to disk.
- Parameters
-
| imagePath | The source image file path. |
| rects | The crop rectangles in source-image coordinates. |
| outputDir | The output directory for generated crops. |
| fmt | The desired output image format. |
| jpegQuality | The JPEG quality to use when encoding JPG output. |
| debugger | Optional debugger used for trace output. |
| filePrefix | Optional prefix for generated filenames. |
- Returns
- The list of written crop file paths.
Definition at line 17 of file CropAdapter.cpp.
The documentation for this class was generated from the following files: