CIAreaMaximum filter not working
CIAreaMaximum filter not working
- Subject: CIAreaMaximum filter not working
- From: Kevin Meaney <email@hidden>
- Date: Wed, 26 Feb 2014 12:50:25 +0000
I've written a command line routine that compares two image files, in the hope of determining if the two files are different. Basically the tool only compares whether the dimensions are different or whether the pixel values are sufficiently different. So the routine has a distance option which is a threshold value over which any color component of any pixel needs to be over to decide if the images are different.
The full single file source code for this is available here:
https://gist.github.com/SheffieldKevin/9228574
To implement this I've used two CIFilters, first the CIDifferenceBlendMode filter followed by the CIAreaMaximum.
I've checked that the CIDifferenceBlendMode is working by grabbing the outputImage CIImage from the filter and saving it in a file on the desktop called deleteme.png. If you look at the code you'll see that the code for saving the intermediate image is still in there. If you compile and run you can setup the command line args similar to:
compareimages -file1 "~/Pictures/DSCN1003.JPG" -file2 "~/Pictures/DSCN1004.JPG"
The color distance option has a default value so is not required.
The intermediate image looks as expected so I'm assuming that the problem has to be with how I'm using the CIAreaMaximum filter.
Can anyone point me in the direction as to what it is I'm doing wrong?
Kevin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden