next up previous contents index
Next: Closing modules Up: Modules Previous: Loading module functions   Contents   Index


Running modules

Now that you did everything, there remains only to run the modules. GOCR allows you to run them all at once, module by module, or module function by module function:

int gocr_runModuleFunction ( int id ); 

int gocr_runModuleType ( gocr_moduleType t );

int gocr_runAllModules ( void );

The functions are simple to use. gocr_runAllModules runs all the modules, taking care of how it's done. For example, charFinder module functions must be called one for each block. It's not a trivial for(), and this is the recommended way to do it. It follows the order that you provided when you appended and inserted the module functions, as described in the last section.

The two other functions are currently not working, due to design issues.

gocr_runModuleType runs a specific module. There's no care taken of the internal data, which must be manually updated. It may be useful if you want just to apply some filters to the image, for example, or if you want to do a different implementation of the existing gocr_runAllModules.

Last there's gocr_runModuleFunction. It runs just one module function, and also doesn't take care of internal data. If you want to use it, you probably know what you are doing.

All functions return 0 on success, -1 on error.


next up previous contents index
Next: Closing modules Up: Modules Previous: Loading module functions   Contents   Index
root 2002-02-17