FOSSredder 0.5.0
Loading...
Searching...
No Matches
opencv::CropAdapter Class Reference

#include <CropAdapter.h>

Static Public Member Functions

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.

Detailed Description

Definition at line 20 of file CropAdapter.h.

Member Function Documentation

◆ 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
imgThe source image.
rectsThe crop rectangles in source-image coordinates.
outputDirThe output directory for generated crops.
fmtThe desired output image format.
jpegQualityThe JPEG quality to use when encoding JPG output.
outBytesOptional sink for encoded crop bytes.
debuggerOptional debugger used for trace output.
filePrefixOptional 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
imagePathThe source image file path.
rectsThe crop rectangles in source-image coordinates.
outputDirThe output directory for generated crops.
fmtThe desired output image format.
jpegQualityThe JPEG quality to use when encoding JPG output.
debuggerOptional debugger used for trace output.
filePrefixOptional prefix for generated filenames.
Returns
The list of written crop file paths.

Definition at line 17 of file CropAdapter.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: