mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 03:46:59 +08:00
Add overload for regionsOfInterest.
This commit is contained in:
@@ -68,6 +68,11 @@ namespace alpr
|
||||
return impl->recognize(imageBytes);
|
||||
}
|
||||
|
||||
AlprResults Alpr::recognize(std::vector<char> imageBytes, std::vector<AlprRegionOfInterest> regionsOfInterest)
|
||||
{
|
||||
return impl->recognize(imageBytes, regionsOfInterest);
|
||||
}
|
||||
|
||||
AlprResults Alpr::recognize(unsigned char* pixelData, int bytesPerPixel, int imgWidth, int imgHeight, std::vector<AlprRegionOfInterest> regionsOfInterest)
|
||||
{
|
||||
return impl->recognize(pixelData, bytesPerPixel, imgWidth, imgHeight, regionsOfInterest);
|
||||
|
@@ -132,8 +132,11 @@ namespace alpr
|
||||
// Recognize from an image on disk
|
||||
AlprResults recognize(std::string filepath);
|
||||
|
||||
// Recognize from byte data representing an encoded image (e.g., BMP, PNG, JPG, GIF etc).
|
||||
AlprResults recognize(std::vector<char> imageBytes);
|
||||
// Recognize from byte data representing an encoded image (e.g., BMP, PNG, JPG, GIF etc).
|
||||
AlprResults recognize(std::vector<char> imageBytes);
|
||||
|
||||
// Recognize from byte data representing an encoded image (e.g., BMP, PNG, JPG, GIF etc).
|
||||
AlprResults recognize(std::vector<char> imageBytes, std::vector<AlprRegionOfInterest> regionsOfInterest);
|
||||
|
||||
// Recognize from raw pixel data.
|
||||
AlprResults recognize(unsigned char* pixelData, int bytesPerPixel, int imgWidth, int imgHeight, std::vector<AlprRegionOfInterest> regionsOfInterest);
|
||||
|
@@ -345,6 +345,13 @@ namespace alpr
|
||||
return this->recognize(img);
|
||||
}
|
||||
|
||||
AlprResults AlprImpl::recognize(std::vector<char> imageBytes, std::vector<AlprRegionOfInterest> regionsOfInterest)
|
||||
{
|
||||
cv::Mat img = cv::imdecode(cv::Mat(imageBytes), 1);
|
||||
|
||||
return this->recognize(img, regionsOfInterest);
|
||||
}
|
||||
|
||||
AlprResults AlprImpl::recognize( unsigned char* pixelData, int bytesPerPixel, int imgWidth, int imgHeight, std::vector<AlprRegionOfInterest> regionsOfInterest)
|
||||
{
|
||||
|
||||
|
@@ -76,6 +76,7 @@ namespace alpr
|
||||
AlprFullDetails recognizeFullDetails(cv::Mat img, std::vector<cv::Rect> regionsOfInterest);
|
||||
|
||||
AlprResults recognize( std::vector<char> imageBytes );
|
||||
AlprResults recognize( std::vector<char> imageBytes, std::vector<AlprRegionOfInterest> regionsOfInterest );
|
||||
AlprResults recognize( unsigned char* pixelData, int bytesPerPixel, int imgWidth, int imgHeight, std::vector<AlprRegionOfInterest> regionsOfInterest );
|
||||
AlprResults recognize( cv::Mat img );
|
||||
AlprResults recognize( cv::Mat img, std::vector<cv::Rect> regionsOfInterest );
|
||||
|
Reference in New Issue
Block a user