.net - AForge.net - BlobCounter get different "zones" between 2 images -
i'm trying write accept 2 images , return array (or kind of collection), , each element represent difference between images.
for example if have photo of background , man standing on right in source image, , same photo difference first photo man standing on left have collection of 1 returned me xy coordinates change starts , width , height of change.
i found aforge has blobcounter class such purpose couldn't understand i'm supposed give - in example (http://www.aforgenet.com/framework/docs/html/d7d5c028-7a23-e27d-ffd0-5df57cbd31a6.htm) in documentation see processing of 1 image - not comparison. couldn't find better example.
what missing here (i'm new image processing).
found solution post here: aforge blob detection along blobcounters
here's solution:
// create filter thresholdeddifference filter = new thresholdeddifference(60); // apply filter filter.overlayimage = currentimg; bitmap resultimage = filter.apply(_lastimg); // create instance of blob counter algorithm blobcounter bc = new blobcounter(); // process binary image bc.processimage(resultimage); rectangle[] rects = bc.getobjectsrectangles(); // process blobs foreach (rectangle rect in rects) { string = string.empty; }
Comments
Post a Comment