How to automatically adjust a photo (ie. brighten, contrast) on iOS? - ios

My iOS app (objective-C) handles photos. I'd like it to be able offer the user a way to automatically "adjust" an image, like how iOS itself does in the Photos app (little magic-wand icon), or how facebook does it. This basically means auto-brightness and auto-contrast adjustment.
So far i've found "filtrr" (more concerned with adding color it seems), and OpenCV (uhh, feels like using a nuclear missile to swat a fly with). Any other hints? Is there some library or a way of even doing this natively in iOS?
thx!

Look into Core Image for info on filters and how to apply them. Apple's programming guide is a good place to start.
Once you're up and running with Core Image, see the autoAdjustmentFilters method for getting a set of filters that's preconfigured for "one touch enhance" kinds of usage.

Related

Is there a way to programmatically access the iOS image describer?

When VoiceOver is enabled, iOS can describe images. If the Image Description option is turned on, this will even create a detailed natural language description of the image.
Is there a way to get this description programmatically? My use case is implementing a thumbnail list, where the image describer only has a tiny image to work with, sometimes with overlaid text, which limits its usefulness. I'd like to give it a slightly larger version of the image and get the description directly so I can set up the accessibilityLabel accordingly.
I just can not find this documented or discussed anywhere, however.
If so, it would be part of the Vision Framework, and is not currently available. I do not see a image description model in Apple's Model Zoo either.
A quick search shows many tutorials on the subject.
It was confirmed by an Apple engineer that there is no public API for this as of iOS 14.

Positioning and Resizing handles similar to Apple Pages

In Apple's Pages app it allows you to add an image or text box or shape layer to the page then resize it by tapping on it and the handles appear. A similar thing also happens in the Pixelmator app and a few others. Is this something made by Apple that I can use in my app or would I have to build it in myself?
As far as I know there is no system support for resize handles and you will need to build it yourself. That's what I've done when I needed them. I added views on top of the thing that I wanted to resize, with pan gesture recognizers attached.
I have an app called CIFilterTest on Github (written in Objective-C, unfortunately) that uses resize handles to let the user move around points and rects when they are needed for the various Core Image filters. Even though it's written in Objective-C it should give you the idea.
Note that most Core Image filters run VERY slowly on the simulator, making the app seem extremely laggy. That's an artifact of running Core Image filters on the simulator. It runs much faster on an actual iOS device.

iOS programmatically capture image

This is more of a theoretical question. I'm fairly new to iOS programming so haven't nailed fully the terms to use in scenarios like this. I've been asked to create an application where I need to fire an event to capture an image programmatically. The application will be in the foreground, and will have the requisite permissions to use the camera. I've been unlucky with my searches so far - likely because I haven't termed them correctly.
My question is this; Given an application with a camera view, set up to capture images - is it possible for me to fire an event within said app to capture the image, without a button necessarily being pressed? If so, how would I go about finding documentation to guide me through?
In an ideal world, I'm hoping for something as simple as cameraObject.capture() or something of that ilk - but an ideal world is a rarity!
Thanks in advance!

Augmented reality API for IPAD specifically

i'm looking for an AR API (possibly free) or SDK that may be used on IPAD.
I've tried Wikitude so far, but it's not adapted for IPAD for the moment, and most of the well known API seems to be only made for iPhone..
Any clue on this one?
Any chance that this API offer the possibility to add the AR view as a subview (for example as an element of a tab bar..:))
Thanks a lot
Why are you going for 3rd party library? You can apply AR using local library. On your ViewController make 2 UIView. The one in the back implement Camera View on it. And the one on the front implement whatever you want to show on the live preview of camera. Then if you want to capture the screen just simply take a screenshot and it'll be saved.

blackberry camera Application

I am implementing camera application using then example comes with blackberry plugin for eclipse named "CameraDemo" the problem is that when the screen loses focus It does not display the camera view istead of it shows like this
has anybody faced such problem whats the solution?
This way of taking picture (using the Player and VideoControl.getSnapshot()) does not work nice on all BB models. I'd even say it works nice only on a narrow set of BB models. So if you are going to use your app on a wide range of BB models, then this is not the right way to go.
Instead to take a picture use a built-in Camera app. Here is a starting point on how to do that.
Basically you invoke the built-in Camera app and listen for the file-system changes to detect a new image file path. Then you need to close the built-in Camera app somehow - it's possible to do that by simulating two 'Esc' button presses.
Yes, this sounds a bit hacky/over-complicated, but that's how BB engeneers arranged that for us. :) BTW, this is actually not so bad if compare with Android where different device manufactorers violate the common rules and implement the Camera app in their specific way so you are not able to write the code once covering all Androids.

Resources