/* The command line version of CERT has a class called CERT_Task which contains the image, path and other input info, along with all of the results from running CERT. The GUI version uses an NSDictionary. All of the keys are strings. Some begin with "CERT." the rest are the plugin ID's of the plugins that generated each output. All of this should probably be in a custom class. */ /* Currently used CERT keys: CERT.image - NSImage - The image to be processed, or that was just processed. CERT.rimage - MPT_RimageAdaptor - The image to be or just processed. Usually only one of image or rimage will be present. CERT.date - NSDate - The date/time the results structure was created. CERT.faces - NSArray containing MPT_Face - All of the faces found in the image. CERT.frame - NSNumber (int) - Monotonically increasing counter. Doesn't reset if the user chooses multiple inputs. CERT.movieFrame - NSNumber (int) - Only present for movies, counts up from 1 for each frame in the movie. Resets for each movie. CERT.patch - MPT_RimageAdaptor - A rimage with the cropped and rotated face patch from the largest face in the image. CERT.path - NSString - Path to the image or video. Will be 'frame#' for live video, with # being updated for each frame. CERT.timing - MPT_Timing - Used to time stages of CERT processing. Variable names used for this dictionary: pluginResults inputs Plugin IDs - NSString or NSNumber or NSArray or NSDictionary - Plugins can return values in different containers. If you need to work with the results from a particular plugin, check that plugin (or plugin type) to see what the results look like. Some notes: Feature plugins should return data either in MPT_Pair objects or NSDictionary's (with "x" and "y" as the keys). Something similar for the facefinder stub. Add a new entry "CERT.timing" which contains a dictionary. The inner keys should all begin with monotonically increasing number to show the order they were entered, along with a descriptive name. The biggest problem is going to be getting timing data from those parts of CERT that precede the current creation of the results data structure. Better to use a custom class that either inherits from or contains a dictionary, but also has a counter and some easy to use methods. -(void)stampWithID:(NSString *)stamp */ /* Sample output, cleaned up and reformatted a bit: {type = mutable, count = 16, capacity = 24, pairs = ( 0 : "CERT.faces" = {type = mutable-small, count = 1, values = ( 0 : )} 30 : "CERT.date" = {time = 281642773} 31 : "CERT.rimage" = 3 : "CERT.patch" = 24 : "CERT.image" = NSImageSize={640, 480} Reps=( NSBitmapImageRep ... ) 25 : "CERT.frame" = {value = +1, type = kCFNumberSInt32Type} 27 : "CERT.path" = {contents = "/Users/asalamon/Pictures/Test2Picture1.jpg"} 23 : "edu.ucsd.mplab.plugins.FaceFinderStub" = {contents = "{x:276, y:150, width:193, height:193, scale:7}"} 1 : "edu.ucsd.mplab.plugins.features.mouth" = {contents = "{371.698, 289.017}"} 2 : "edu.ucsd.mplab.plugins.features.nose" = {contents = "{374.446, 243.165}"} 9 : "edu.ucsd.mplab.plugins.features.rightEye" = {contents = "{336.923, 202.856}"} 28 : "edu.ucsd.mplab.plugins.features.leftEye" = {contents = "{406.378, 204.256}"} 4 : "edu.ucsd.mplab.plugins.PoseDetector" = {type = immutable, count = 3, capacity = 3, pairs = ( 0 : "Yaw" = {value = +8.9252653122, type = kCFNumberFloat32Type} 1 : "Roll" = {value = +2.2472457886, type = kCFNumberFloat32Type} 3 : "Pitch" = {value = +4.7320227623, type = kCFNumberFloat32Type} )} 13 : "edu.ucsd.mplab.plugins.SmileDetector2" = {value = -1.71087932586669921875, type = kCFNumberFloat64Type} 22 : "edu.ucsd.mplab.plugins.BlinkAU" = {type = mutable, count = 1, capacity = 3, pairs = ( 0 : "(AU 45) Blink/Eye Closure" = {value = -0.71348136882649604296, type = kCFNumberFloat64Type} )} 29 : "edu.ucsd.mplab.plugins.CERT4_4_Weights" = {type = mutable, count = 11, capacity = 12, pairs = ( 0 : "(AU 1) Inner Brow Raise" = {value = -0.65930478122964353282, type = kCFNumberFloat64Type} 1 : "(AU 12) Lip Corner Pull" = {value = -0.68556237750668935771, type = kCFNumberFloat64Type} 2 : "(AU 4) Brow Lower" = {value = -0.17284512869581172834, type = kCFNumberFloat64Type} 3 : "(AU 5) Eye Widen" = {value = -0.33584759785811874044, type = kCFNumberFloat64Type} 7 : "(AU 15) Lip Corner Depressor" = {value = +2.39823687149976905175, type = kCFNumberFloat64Type} 9 : "(AU 14) Dimpler" = {value = +0.85220920843318537230, type = kCFNumberFloat64Type} 10 : "(AU 20) Lip stretch" = {value = +1.59788787264522080811, type = kCFNumberFloat64Type} 12 : "(AU 9) Nose Wrinkle" = {value = +0.09519795683727552693, type = kCFNumberFloat64Type} 13 : "(AU 10) Lip Raise" = {value = -0.13742291535817993675, type = kCFNumberFloat64Type} 14 : "(AU 17) Chin Raise" = {value = +0.82126204247349432475, type = kCFNumberFloat64Type} 15 : "(AU 2) Outer Brow Raise" = {value = -0.66682534204649557275, type = kCFNumberFloat64Type} )} )} */