KMDocumentAIManager.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // KMDocumentAIManager.h
  3. // PDF Master
  4. //
  5. // Created by 丁林圭 on 2023/2/2.
  6. //
  7. #import <Foundation/Foundation.h>
  8. //#import <ComDocumentAIKit/ComDocumentAIKit.h>
  9. typedef NS_ENUM(NSInteger,CDocumentAIType) {
  10. CDocumentAITypeOCR,
  11. CDocumentAITypeCIM,
  12. };
  13. @class KMDocumentAIManager;
  14. @protocol KMDocumentAIManagerDelegate <NSObject>
  15. @optional
  16. - (void)documentAIManagerDidStart:(KMDocumentAIManager *)manager;
  17. - (void)documentAIDidFinish:(KMDocumentAIManager *)manager;
  18. - (void)documentAIManager:(KMDocumentAIManager *)manager didStartImageAtIndex:(NSInteger)index;
  19. //- (void)documentAIManager:(KMDocumentAIManager *)manager didFinishOCRImageAtIndex:(NSInteger)index results:(NSArray<COCRResult *> *)results;
  20. - (void)imageEngineManager:(KMDocumentAIManager *)manager didFinishCIImageAtIndex:(NSInteger)index outImage:(NSString *)filePath;
  21. - (void)documentAIManager:(KMDocumentAIManager *)manager didFailureImageAtIndex:(NSInteger)index error:(NSError *)error;
  22. @end
  23. @interface KMDocumentAIManager : NSObject
  24. @property (nonatomic,assign) id<KMDocumentAIManagerDelegate> delegate;
  25. @property (nonatomic,readonly) NSMutableArray *images;
  26. @property (nonatomic,assign) CDocumentAIType documentAIType;
  27. + (KMDocumentAIManager *)defaultManager;
  28. //- (void)recognitionImages:(NSArray *)images withModelType:(COCRModelType)modelType;
  29. - (void)increaseImages:(NSArray *)images;
  30. @end