Added is_loaded function to C binding

This commit is contained in:
Matt Hill
2016-10-18 20:36:52 -04:00
parent d2d07100ab
commit a78c9ddf39
2 changed files with 8 additions and 0 deletions

View File

@@ -30,6 +30,11 @@ OPENALPRC_DLL_EXPORT OPENALPR* openalpr_init(const char* country, const char* co
return (OPENALPR*) alpr_inst;
}
OPENALPRC_DLL_EXPORT int is_loaded(OPENALPR* instance)
{
return (int) ((alpr::Alpr*) instance)->isLoaded();
}
// Set the country used for plate recognition
OPENALPRC_DLL_EXPORT void openalpr_set_country(OPENALPR* instance, const char* country)
{

View File

@@ -44,6 +44,9 @@ struct AlprCRegionOfInterest
// Initializes the openALPR library and returns a pointer to the OpenALPR instance
OPENALPR* openalpr_init(const char* country, const char* configFile, const char* runtimeDir);
// Returns 1 if the library was loaded successfully, 0 otherwise
int is_loaded(OPENALPR* instance);
// Set the country used for plate recognition
void openalpr_set_country(OPENALPR* instance, const char* country);