RecAPI
On the sample project for Mac OS X

The C Sample Viewer Application of Nuance Capture SDK serves to give a better understanding of the concepts behind its functionality. It lets you view and run several code fragments representing typical constituent tasks of the toolkit.

You can select a command line application or a Cocoa-based Objective C UI application for studying the samples.

In both applications, you can choose the sample code you want to study. You can get some information about the selected sample:

  • description of sample,
  • input and output files,
  • used RecAPI functions.

See the list of samples for a detailed description about each sample.

Command line sample

For getting the applications, you should make them using the Makefile in the sample folder. Compiling will be successful only after filling two empty strings (at the LICENSE_PATH macro and the #include) in the file sample.h and cutting out the #error command.

You can make the command line application with the following commands.

    make
    ./sample -h 

The command line option -h writes a short help on how to use the command line application. Running it without any command line option, it shows the number and title of the available samples.

Note:
See the supplied Makefile for the use of OCRLIBPATH, OCRINCPATH, OCRRUNPATH and OCRLIBS. They are specified assuming that you will use the RunTime framework next to your application, from the ../Frameworks relative path. If you want to use it form e.g. /Library/Frameworks, you must change OCRRUNPATH setting it to that path.

Cocoa-based sample

You may build a Cocoa-based Objective C UI version of the Sample Viewer using XCode. This XCode project is located in the folder Sample/CocoaSamples.

You can find detailed description in Sample/CocoaSamples/HowTo_CocoaProjectWithCSDK.pdf about how to create a Cocoa-based project using Capture SDK. Build the sample program following those instructions. When you run the application, first check the path for the Sample files on the UI (next to the Start Text button). The path in the box must point to the Samples folder containing the input image files (and the CPP source files). With some versions of XCode this path might not be correct, in that case you must modify it before you start a test.