I'd like to know if there's anyway I can compare two BitmapData and get a "similarity percentage" (knowing how look-alike they are). I've done a bit of research and came across bitmapData.compare(otherBmd), but that only returns if they differ in size, or pixel, and not how much they differ.
The point of this was to compare some Bmd obtained through a camera with a library image (so this is what I got so far):
import flash.display.Bitmap;
import flash.display.BitmapData;
var img1:BitmapData = new monaLisa();
var cam:Camera = Camera.getCamera();
var video:Video = new Video(camMock.width,camMock.height);
video.attachCamera(cam);
video.x=camMock.x;
video.y=camMock.y;
addChild(video);
var pic:BitmapData = new BitmapData(video.width,video.height);
var picBmp:Bitmap = new Bitmap(pic);
picBmp.x = camMock.x;
picBmp.y = camMock.y;
captureCam.buttonMode = true;
captureCam.addEventListener(MouseEvent.CLICK,captureImage);
function captureImage(e:MouseEvent):void {
pic.draw(video);
trace(pic.compare(img1));
//compare two bmd
//do x
}