* This routine extracts micro-features from the specified * blob and returns a list of the micro-features. All * micro-features are normalized according to the specified * line statistics. * @param Blob blob to extract micro-features from * @param cn_denorm control parameter to feature extractor * @return List of micro-features extracted from the blob. * @note Exceptions: none * @note His
| 70 | * @note History: 7/21/89, DSJ, Created. |
| 71 | */ |
| 72 | MICROFEATURES BlobMicroFeatures(TBLOB* Blob, const DENORM& cn_denorm) { |
| 73 | MICROFEATURES MicroFeatures = NIL_LIST; |
| 74 | LIST Outlines; |
| 75 | LIST RemainingOutlines; |
| 76 | MFOUTLINE Outline; |
| 77 | |
| 78 | if (Blob != NULL) { |
| 79 | Outlines = ConvertBlob(Blob); |
| 80 | |
| 81 | RemainingOutlines = Outlines; |
| 82 | iterate(RemainingOutlines) { |
| 83 | Outline = (MFOUTLINE) first_node (RemainingOutlines); |
| 84 | CharNormalizeOutline(Outline, cn_denorm); |
| 85 | } |
| 86 | |
| 87 | RemainingOutlines = Outlines; |
| 88 | iterate(RemainingOutlines) { |
| 89 | Outline = (MFOUTLINE) first_node(RemainingOutlines); |
| 90 | FindDirectionChanges(Outline, classify_min_slope, classify_max_slope); |
| 91 | MarkDirectionChanges(Outline); |
| 92 | MicroFeatures = ConvertToMicroFeatures(Outline, MicroFeatures); |
| 93 | } |
| 94 | FreeOutlines(Outlines); |
| 95 | } |
| 96 | return MicroFeatures; |
| 97 | } /* BlobMicroFeatures */ |
| 98 | |
| 99 | |
| 100 | /*--------------------------------------------------------------------------- |
no test coverage detected