Performing an Optimization¶
This code snippet shows how to perform an optimization.
C++¶
#include <eVision/EasyOcr/EasyDeepOCR/ETextReader.h>
using namespace eVision;
namespace EDO = eVision::EasyDeepOCR;
// Create an ESample vector
std::vector<EDO::ESample> samples;
// Fill the vector
// ...
// Create an ESampleList instance
EDO::ESampleList sampleList;
// Set the samples
sampleList.SetSamples(samples);
// Create an ETextReader instance
EDO::ETextReader reader;
// Initialize the ETextReader
reader.Initialize();
// Optimize the ETextReader
EDO::EOptimizationReport report = reader.Optimize(sampleList);
// ...
C#¶
using eVision;
using EDO = eVision.EasyDeepOCR;
// Create an ESample vector
EDO.ESample[] samples = new EDO.ESample[] { } ;
// Fill the vector
// ...
// Create an ESampleList instance
EDO.ESampleList sampleList = new EDO.ESampleList();
// Set the samples
sampleList.Samples = samples;
// Create an ETextReader instance
EDO.ETextReader reader = new EDO.ETextReader();
// Initialize the ETextReader
reader.Initialize();
// Optimize the ETextReader
EDO.EOptimizationReport report = reader.Optimize(sampleList);
// ...
Python¶
import eVision
from eVision import EasyDeepOCR as EDO
# Create an ESample vector
samples = []
# Fill the vector
# ...
# Create an ESampleList instance
sampleList = EDO.ESampleList()
# Set the samples
sampleList.Samples = samples
# Create an ETextReader instance
reader = EDO.ETextReader()
# Initialize the ETextReader
reader.Initialize()
# Optimize the ETextReader
report = reader.Optimize(sampleList);
# ...