C# Class RightpointLabs.Pourcast.Infrastructure.Services.FaceRecognitionService

Inheritance: IFaceRecognitionService
Mostrar archivo Open project: RightpointLabs/Pourcast Class Usage Examples

Public Methods

Method Description
FaceRecognitionService ( string apiKey, string apiSecret, string tagNamespace, IImageCleanupService imageCleanupService, IOverlayImageProvider overlayImageProvider ) : System
ProcessImage ( string rawDataUrl, string &intermediateUrl, string &finalUrl, bool &addedOverlay ) : string[]

Private Methods

Method Description
ConvertPoint ( SkyBiometry.Client.FC.Point point, Bitmap image ) : IntPoint
GetDataFromUrl ( string dataUrl, string &contentType ) : byte[]
GetMatch ( Tag tag ) : string
GetTagBoundingBox ( Tag tag, Bitmap image ) : Rectangle

Get the bounding box of the face. Center, width, and height are percent-of-image. Convert them to absolute pixels (needed for our marker/crop algorithms)

ProcessFace ( Tag face, Bitmap intermediateImage, Bitmap image ) : bool
ResizePictureForDetection ( byte data ) : byte[]

Scales down the byte size of the image by reducing dimensions and/or introducing compression. It aims to get it under 2MB so the web service won't reject it.

_GetMatch ( Tag tag ) : string

Method Details

FaceRecognitionService() public method

public FaceRecognitionService ( string apiKey, string apiSecret, string tagNamespace, IImageCleanupService imageCleanupService, IOverlayImageProvider overlayImageProvider ) : System
apiKey string
apiSecret string
tagNamespace string
imageCleanupService IImageCleanupService
overlayImageProvider IOverlayImageProvider
return System

ProcessImage() public method

public ProcessImage ( string rawDataUrl, string &intermediateUrl, string &finalUrl, bool &addedOverlay ) : string[]
rawDataUrl string
intermediateUrl string
finalUrl string
addedOverlay bool
return string[]