// // KMDocumentAIManager.h // PDF Master // // Created by 丁林圭 on 2023/2/2. // #import //#import typedef NS_ENUM(NSInteger,CDocumentAIType) { CDocumentAITypeOCR, CDocumentAITypeCIM, }; @class KMDocumentAIManager; @protocol KMDocumentAIManagerDelegate @optional - (void)documentAIManagerDidStart:(KMDocumentAIManager *)manager; - (void)documentAIDidFinish:(KMDocumentAIManager *)manager; - (void)documentAIManager:(KMDocumentAIManager *)manager didStartImageAtIndex:(NSInteger)index; //- (void)documentAIManager:(KMDocumentAIManager *)manager didFinishOCRImageAtIndex:(NSInteger)index results:(NSArray *)results; - (void)imageEngineManager:(KMDocumentAIManager *)manager didFinishCIImageAtIndex:(NSInteger)index outImage:(NSString *)filePath; - (void)documentAIManager:(KMDocumentAIManager *)manager didFailureImageAtIndex:(NSInteger)index error:(NSError *)error; @end @interface KMDocumentAIManager : NSObject @property (nonatomic,assign) id delegate; @property (nonatomic,readonly) NSMutableArray *images; @property (nonatomic,assign) CDocumentAIType documentAIType; + (KMDocumentAIManager *)defaultManager; //- (void)recognitionImages:(NSArray *)images withModelType:(COCRModelType)modelType; - (void)increaseImages:(NSArray *)images; @end