// // MPT_CERT.h // AUCoderDemo // // Created by Andrew Salamon on 5/17/06. // Copyright (c) 2006 Machine Perception Laboratory // University of California San Diego. // #import @class MPT_Face; @class MPT_RimageAdaptor; @class MPT_PluginControllerBase; @interface MPT_CERT : NSObject { NSImage *grayImage; NSImage *videoImage; NSMutableDictionary *pluginResults; NSPoint leftEye; NSPoint rightEye; NSMutableArray *faceArray; // MPT_Face *largestFace; BOOL inputIsFaces; void *mpeyefinder; ///< MP_eyefinderWrapper. void *rotatingEyefinder; ///< mp_rotatingEyefinder. void *gabor; ///< Can be either mp_threadedGabor or MP_Gabor. void *rotator; ///< MP_RotateFace. void *patch; ///< RImage used to hold the rotated face patch. NSMutableDictionary *featuresByName; // convenience object so we don't have to search through all feature plugins every time NSUserDefaults *prefs; MPT_PluginControllerBase *myPlugins; /// In a multithreaded environment, enabling or disabling feature plugins while running live video or images can cause crashes so we need to put locks around critical sections. Currently that is the loop that updates the feature detector and the call that uses the feature detector to find faces and features. There may still be other situations where a lock is needed. NSLock *featureLock; NSArray *faceFinderLabels; } - (void)process:(NSDictionary *)inputs; //- (void)processRImageFile:(NSString *)rimagePath; //- (void)processImage:(NSImage *)image fromPath:(NSString *)imagePath; //- (void)processRImageAdaptor:(MPT_RimageAdaptor *)rimageAdaptor fromPath:(NSString *)imagePath; - (NSMutableDictionary *)pluginResults; - (NSImage *)grayImage; - (NSImage *)patchImage; - (NSImage *)videoImage; - (NSArray *)faces; - (MPT_Face *)findLargestFace; - (void)clearResults; - (void)setDoingSequence:(BOOL)seq; ///< set to YES if this is a time sequence of images (e.g. video). - (BOOL)doingSequence; - (BOOL)findFaces; - (BOOL)displayGray; - (BOOL)multipleRotations; - (unsigned int)alignmentMethod; - (float)eyefinderOffset; + (float)defaultEyefinderOffset; - (void)setEyefinderOffset:(float)value; - (float)eyefinderDropoff; + (float)defaultEyefinderDropoff; - (void)setEyefinderDropoff:(float)value; - (int)minScale; - (void)setMinScale:(int)value; - (int)maxScale; - (void)setMaxScale:(int)value; - (void)makeThreadsafe; ///< This must be called if this CERT object will be used in a multi-threaded environment. - (void)pluginStateHasChanged:(id)plugin; - (BOOL)savePatchToFile:(NSString *)path; - (BOOL)inputIsFaces; - (void)setInputIsFaces:(BOOL)value; @end