Fix ALPR Batch and memory leak

This commit is contained in:
2026-04-15 23:00:19 +10:00
parent b05c49ad93
commit 808df4656d
8 changed files with 1846 additions and 54 deletions

View File

@@ -17,6 +17,7 @@
using namespace ANSCENTER;
using namespace cv;
using namespace std;
cv::Mat JpegStringToMat(const std::string& jpegStr) {
if (jpegStr.length() > 10) {
try {
@@ -1366,8 +1367,8 @@ int TestGetImage() {
}
int GenerateVideo() {
std::string imageFolder = "E:\\Programs\\DemoAssets\\ImageSeries\\20260413_152604.321";
std::string outputVideoPath = "E:\\Programs\\DemoAssets\\ImageSeries\\output3.mp4";
std::string imageFolder = "E:\\Programs\\DemoAssets\\ImageSeries\\20260415_142435.655";
std::string outputVideoPath = "E:\\Programs\\DemoAssets\\ImageSeries\\output7.mp4";
int conversionResult = ANSCV_ImagesToMP4_S(imageFolder.c_str(), outputVideoPath.c_str(), 0,20);
if (!conversionResult) {
std::cerr << "Failed to convert images to MP4." << std::endl;
@@ -1418,6 +1419,13 @@ int OpenCVFunctionTest() {
int main()
{
ANSCENTER::ANSOPENCV::InitCameraNetwork();
// Print the FFmpeg library license strings. The FFmpeg symbols are
// resolved inside ANSCV.dll (which is linked against libavcodec etc.),
// so this works without the unit test having to link FFmpeg itself.
//ANSCV_PrintFFmpegLicense_S();
//OpenCVFunctionTest();
GenerateVideo();
//VideoTestClient();