OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [MW_0_8_9PRE7/] [mw/] [src/] [demos/] [nxscribble/] [li_recognizer_internal.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 673 markom
/*
2
 *  li_recognizer_internal.h
3
 *
4
 *  Adapted from cmu_recognizer_internal.h.
5
 *  Credit to Dean Rubine, Jim Kempf, and Ari Rapkin.
6
 */
7
 
8
#ifndef _LI_RECOGNIZER_INTERNAL_H_
9
 
10
#define _LI_RECOGNIZER_INTERNAL_H_
11
 
12
#include <hre_internal.h>
13
#include "sc.h"
14
 
15
typedef struct PointList {
16
    int npts;
17
    int xrange, yrange;
18
    pen_point* pts;
19
    struct PointList* next;
20
} point_list;
21
 
22
typedef struct {
23
    char* file_name;              /*The classifier file name.*/
24
    sClassifier sc;               /*The classifier.*/
25
    point_list* ex[MAXSCLASSES];   /*The training examples.*/
26
    char* cnames[MAXSCLASSES];    /*The class names.*/
27
    point_list* canonex[MAXSCLASSES];   /* Canonicalized versions of the strokes. */
28
    point_list* dompts[MAXSCLASSES];    /* Dominant points */
29
} rClassifier;
30
 
31
 
32
/*This structure contains extra fields for instance-specific data.*/
33
 
34
typedef struct {
35
    /*Instance-specific data.*/
36
    u_int li_magic;            /*Just to make sure nobody's cheating.*/
37
    rClassifier li_rc;         /*The character classifier.*/
38
} li_recognizer;
39
 
40
 
41
/*Name of the default classifier file.*/
42
#define LI_DEFAULT_CLASSIFIER_FILE   "default.cl"
43
 
44
/*Classifier file extension.*/
45
#define LI_CLASSIFIER_EXTENSION ".cl"
46
 
47
/*Locale supported by recognizer.*/
48
#define LI_SUPPORTED_LOCALE  REC_DEFAULT_LOCALE
49
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.