Core Image Programming Guide

标签: Core Imageios
214人阅读 评论(0) 收藏 举报

Core Image Programming Guide


AboutCore Image

Core Image is animage processing and analysis technology designed to provide near real-timeprocessing for still and video images. It operates on image data types from theCore Graphics, Core Video, and Image I/O frameworks, using either a GPU or CPUrendering path. Core Image hides the details of low-level graphics processingby providing an easy-to-use application programming interface (API). You don’tneed to know the details of OpenGL or OpenGL ES to leverage the power of theGPU, nor do you need to know anything about Grand Central Dispatch (GCD) to getthe benefit of multicore processing. Core Image handles the details for you.


翻译:Core Image是一种理和分析技,对静止图像和视频图像提供接近实时理。它作用于的图像数据类型来源于CoreGraphics, Core VideoImage I/O frameworks,使用一个GPUCPU渲染路径。Core Image提供一个易于使用的用程序程接口(API),藏了低别的理的细节。你不需要知道OpenGL或者OpenGL ES细节,以及充分利用GPU的能力,也不需要了解大中央度(GCD)任何事情来得到多核理的好Core Image经为理这些细节了。


build-in filters(内置过滤器) rendering(渲染)  runtime(运行时) processing(处理)provides(提供)

At a Glance

The Core Image framework provides(提供)主要提供的功能:

·      Access to built-in image processing filters访问内置图像处理过滤器)

·      Feature detection capability(特征检测能力)

·      Support for automatic image enhancement(支持自动图像增强)

·      The ability to chain multiple filterstogether to create custom effects(能够多个过滤器链在一起创建自定义效果)

·      Support for creating custom filters thatrun on a GPU(支持创建自定义过滤器运行在GPU

·      Feedback-based image processingcapabilities(基于反馈的图像处理功能)

Core Image is Efficient and Easy to Usefor Processing and Analyzing ImagesCore Image用于理和分析片很高效很简单)

Core Image provides more than 90 built-in filters on iOS and over 120 onOS X. You set up filters by supplying key-value pairsfor a filter’s input parameters.The output ofone filter can be the input of another, making it possible to chainnumerous filters together to create amazing effects. Ifyou create a compound effect that you want to use again, you can subclassCIFilter to capture the effect “recipe.”

翻译: Core Image提供了超过90多种的内置过滤器在IOS上,在OS X上提供超过120多种。你设置滤镜时,可以通过提供键值对的方式对滤波器输入参数。一个滤波器的输出可以是另一个滤波器的输入使许多过滤器链结合起来,创造出神奇的效果。如果你创建了一个复合的效果,然后你又想重复用它,你也可以继承CIFilter拍摄效果的“秘方”

There are more than a dozencategories of filters. Some are designed to achieve artistic results, such asthe stylize and halftone filter categories. Others are optimal for fixing imageproblems, such as color adjustment and sharpen filters.


Core Image can analyze thequality of an image and provide a set of filters with optimal settings foradjusting such things as hue, contrast, and tone color, and for correcting for flash artifacts such as redeye. It does all this with one method call on yourpart.


Core Image can detect human facefeatures in still images andtrack them over time in video images. Knowingwhere faces are can help you determine where to place a vignette or apply otherspecial filters.

翻译:Core Image 可以识别人脸特征在图像静止的时候可以跟踪他们随着时间的推移在视频中的图像Knowing where faces are can helpyou determine where to place a vignette or apply other special filters


Relevant chapters: Processing Images, Detecting Faces in an Image, Auto Enhancing Images, Subclassing CIFilter: Recipes for Custom Effects

相关章节:Processing Images(处理图像),Detecting Faces in an Image(检测图像中的人脸),Auto Enhancing Images(自动增强图像),Subclassing CIFilter:Recipes for CustomEffects(自定义效果的方法)

Query Core Image to Get a List of Filters and TheirAttributes(查询Core Image得到过滤器列表和它们的属性)

Core Image has “built-in”reference documentation for its filters. You can query the system to find outwhich filters are available. Then, for each filter, you can retrieve adictionary that contains its attributes, such as its input parameters, defaultsparameter values, minimum and maximum values, display name, and more.


Relevant chapter: Queryingthe System for Filters(相关章节,参考 Queryingthe System for Filters

Core Image Can AchieveReal-Time Video Performance

Core Image可以实现实时视频性能

If your app needs to process videoin real-time, there are several things you can do to optimize performance.

翻译: 如果您的应用程序需要实时处理视频,有几个事情可以做,以优化性能

Relevant chapter: Gettingthe Best Performance (相关章节 参考  Gettingthe Best Performance)

Use an Image Accumulator to SupportFeedback-Based Processing(使用像累加器支持基于反的处理Accumulator  [ə'kjumjəletɚ]累加器)

The CIImageAccumulator class is designed for efficient feedback-based imageprocessing, which you might find useful if your app needs to image dynamicalsystems.


相关章节 请查考 UsingFeedback to Process Images

单词:Distribute [dɪˈstrɪbjut]   vt.分配,散布;   散发,分发;   把…分类;  

 Kernels美 ['kɜ:nəlz] n  要点,仁;核;谷粒(kernel的名词复数 )

Create and DistributeCustom Kernels and Filters 建和分发自定义核和过滤

If none of the built-in filters suits yourneeds, even when chained together, consider creating a custom filter. You’llneed to understand kernels—programs that operate at the pixel level—becausethey are at the heart of every filter.


In OS X, you can package one ormore custom filter as an image unit so that other apps can load and use them.


Relevantchapters: WhatYou Need to Know Before Writing a Custom Filter, CreatingCustom Filters, Packagingand Loading Image Units


Other important documentation forCore Image includes:


·      Core Image ReferenceCollection  provides a detailed description of the classes available in the Core Imageframework.

·      Core Image ReferenceCollection提供了在核心图像框架中可用的类的详细描述

·      Core Image Filter Reference  describes the built-in image processingfilters that Apple provides with iOS and OS X, and shows how images appear beforeand after processing with a filter.

  Core Image Filter Reference描述内置图像处理滤波器,提供与苹果的iOS和OS X,和显示画面出现在与滤波处理后

· Core Image Kernel LanguageReference describes the language for creating kernel routines for custom filters.

Core Image Kernel LanguageReference描述了用于创建自定义过滤器的内核例程的语言