5

I am doing a MAC App in swift,i was able to preview camera on NSView now i want to change brightness/contrast/white-balance and all camera related settings.

I am using AVFoundation framework to preview the camera and i have slider to change the values , How can i change all those setting with user values.

How this AVFondations link with IOKit.. I found one UVCCamera controls link to change Manual camera control, can i use this format???

and in one more site i found that

'IOKit -- Low-level framework for communicating with the kernel and hardware. Apple advises not to use this framework directly and will reject it from the AppStore.'

Thanks

iosLearner
  • 1,312
  • 1
  • 16
  • 30
  • 4
    *doing a MAC App in iOS 8* ? What are you talking about ? – Raptor Jan 02 '15 at 06:39
  • @Raptor sorry in swift.. thanks – iosLearner Jan 02 '15 at 06:43
  • I understand you are asking for adjustment filters applied to an image once you have it and not the actual camera settings to control before you take images or video i.e. shutter speed, exposure and ISO. Is that right? – sangonz Mar 04 '15 at 13:42
  • @sangonz Yes, How can i change manually? – iosLearner Mar 05 '15 at 06:26
  • See this post: http://stackoverflow.com/questions/5156872/how-to-apply-filters-to-avcapturevideopreviewlayer – duan Mar 06 '15 at 05:44
  • How can i change it for iOS app. I am doing an app where avcapturesession is continously opened. And i want to apply brightness on that. Can anyone help me? – Kirti Parghi Aug 06 '15 at 17:26

1 Answers1

2

If you want to change attributes of already captured images, it seems like you need to look into the CIFilter class, which is related to changing images. See https://developer.apple.com/documentation/coreimage/cifilter/filter_parameter_keys, where it documents filter parameters such as:

  • kCIInputSharpnessKey A key for a scalar value (NSNumber) that specifies the amount of sharpening to apply.
  • ...
  • kCIInputIntensityKey — A key for a scalar value (NSNumber) that specifies an intensity value.
  • kCIInputEVKey — A key for a scalar value (NSNumber) that specifies how many F-stops brighter or darker the image should be.
  • ...
  • kCIInputBrightnessKey — A key for a scalar value (NSNumber) that specifies a brightness level.

On the same page, there are also some links to related code samples doing some of this stuff.

Hopefully this will get you on the way to changing the settings you want to change. If you are building an user interface, you might also want to look into the Core Imaging stuff, where they have separate Core Image Views for addition into your own applications.

R. Rincón
  • 365
  • 2
  • 13
holroy
  • 3,047
  • 25
  • 41