core-image

Core Image face detection broken on 64 bit iOS?

*爱你&永不变心* 提交于 2019-12-03 02:48:25
问题 So, I have an app that uses the face detection feature of Core Image ( https://itunes.apple.com/us/app/ace-freakyface-cartoon-mask/id454513332?mt=8 ) and I just got the new iPhone 5s and the app no longer detects a face. I'm also receiving an error in the console while debugging: /System/Library/PrivateFrameworks/FaceCore.framework/fcl-fc-3.dat: mach-o, but wrong architecture 2013-09-25 20:17:22.861 faceMaker[474:a16b] Face detection finding face error: Error Domain=FCRFaceDetectorErrorDomain

Core Image face detection broken on 64 bit iOS?

给你一囗甜甜゛ 提交于 2019-12-02 16:21:39
So, I have an app that uses the face detection feature of Core Image ( https://itunes.apple.com/us/app/ace-freakyface-cartoon-mask/id454513332?mt=8 ) and I just got the new iPhone 5s and the app no longer detects a face. I'm also receiving an error in the console while debugging: /System/Library/PrivateFrameworks/FaceCore.framework/fcl-fc-3.dat: mach-o, but wrong architecture 2013-09-25 20:17:22.861 faceMaker[474:a16b] Face detection finding face error: Error Domain=FCRFaceDetectorErrorDomain Code=2 "dlopen(/System/Library/PrivateFrameworks/FaceCore.framework/fcl-fc-3.dat, 2): no suitable

How change kCIInputBrightnessKey using slider value in Swift, I'm getting either white or black picture whatever value the slider get

亡梦爱人 提交于 2019-12-02 10:25:39
The minimum value of the slider is -1 the maximum value is +1. @IBAction func changeContrast(_ sender: UISlider) { DispatchQueue.main.async { let beginImage = CIImage(image: self.myImageView.image!) self.filter = CIFilter(name: "CIColorControls") self.filter?.setValue(beginImage, forKey: kCIInputImageKey) self.filter.setValue(sender.value, forKey: kCIInputBrightnessKey) print("Current value of the slider - \(sender.value)") self.filteredImage = self.filter?.outputImage self.myImageView.image = UIImage(cgImage: self.context.createCGImage(self.filteredImage!, from: (self.filteredImage?.extent)!)

How to convert bytes to half-floats in Swift?

我怕爱的太早我们不能终老 提交于 2019-12-02 08:59:48
问题 How can I convert two bytes (UInt8) to a half-precision (16-bit) Float in Swift, such as needed when reading the output of CIAreaHistogram with the kCIFormatRGBAh, as in the following example: func areaHistogram(image : UIImage) { let inputImage = CIImage(image: image) let totalBytes : Int = bpp * BINS //8 * 64 for example let bitmap : UnsafeMutablePointer<Void> = calloc(totalBytes, bpp) let filter = CIFilter(name: "CIAreaHistogram")! filter.setValue(inputImage, forKey: kCIInputImageKey)

How to convert bytes to half-floats in Swift?

拟墨画扇 提交于 2019-12-02 05:27:45
How can I convert two bytes (UInt8) to a half-precision (16-bit) Float in Swift, such as needed when reading the output of CIAreaHistogram with the kCIFormatRGBAh, as in the following example: func areaHistogram(image : UIImage) { let inputImage = CIImage(image: image) let totalBytes : Int = bpp * BINS //8 * 64 for example let bitmap : UnsafeMutablePointer<Void> = calloc(totalBytes, bpp) let filter = CIFilter(name: "CIAreaHistogram")! filter.setValue(inputImage, forKey: kCIInputImageKey) filter.setValue(CIVector(x: 0, y: 0, z: image.size.width, w: image.size.height), forKey: kCIInputExtentKey)

How can I fix a Core Image's CILanczosScaleTransform filter border artifact?

怎甘沉沦 提交于 2019-12-02 04:07:16
I want to implement an image downscaling algorithm for iOS. After reading that Core Images's CILanczosScaleTransform was a great fit for it, I implemented it the following way: public func resizeImage(_ image: UIImage, targetWidth: CGFloat) -> UIImage? { assert(targetWidth > 0.0) let scale = Double(targetWidth) / Double(image.size.width) guard let ciImage = CIImage(image: image) else { fatalError("Couldn't create CIImage from image in input") } guard let filter = CIFilter(name: "CILanczosScaleTransform") else { fatalError("The filter CILanczosScaleTransform is unavailable on this device.") }

“unrecognized selector” when attempting to access CIFilter's outputImage

ε祈祈猫儿з 提交于 2019-12-01 18:54:42
I'm experimenting with Core Image (on OS X, 10.7.3) for the first time and am running into a brick wall. I'm certain this is something silly I'm doing and just need someone more familiar with the framework to point it out to me. Consider the following code (let's stipulate that imageURL is a valid file URL pointing to a JPG on disk): CIImage *inputImage = [CIImage imageWithContentsOfURL:imageURL]; CIFilter *filter = [CIFilter filterWithName:@"CIAreaAverage" keysAndValues: kCIInputImageKey, inputImage, kCIInputExtentKey, [inputImage valueForKey:@"extent"], nil]; CIImage *outputImage = (CIImage

how to perform Bump Distortion in ios 5.0?

半腔热情 提交于 2019-12-01 14:42:41
i need to perform Bump Distortion in ios 5.0 ... my xcode doesn't show any error and also i am not get any output ... while trace and print the Bump filter instance it prints the null value... any idea about that... some of the post shows that was not work in ios 5.0, any other way is there to perform the Bump Distortion... Thanks in advance.... Regards, Spynet My code... context = [CIContext contextWithOptions:nil]; CIFilter *bumpDistortion = [CIFilter filterWithName:@"CIBumpDistortion"]; [bumpDistortion setValue:ciimage forKey:kCIInputImageKey]; [bumpDistortion setValue:[CIVector vectorWithX

How to adjust a color image like a scanned image

别说谁变了你拦得住时间么 提交于 2019-12-01 13:21:58
I want to make a effect that a colored normal image to a scanned image. like 2 pictures below, first image is the original image, second image is the adjusted image, effects should like the second image, the text on back of the page should also disappear: First image: Second image: I want to use CoreImage and CIFilter to do this. besides contrast and brightness. I think should adjust level like photoshop. but how can adjust that? or other method? I have tried to adjust it in photoshop, it seems that use photoshop's level function can reach this effect, the value shows on picture below: but I

How to adjust a color image like a scanned image

不羁岁月 提交于 2019-12-01 09:56:41
问题 I want to make a effect that a colored normal image to a scanned image. like 2 pictures below, first image is the original image, second image is the adjusted image, effects should like the second image, the text on back of the page should also disappear: First image: Second image: I want to use CoreImage and CIFilter to do this. besides contrast and brightness. I think should adjust level like photoshop. but how can adjust that? or other method? I have tried to adjust it in photoshop, it