您的位置:首页 > 产品设计 > UI/UE

Core Image Programming Guide

2016-08-29 15:00 344 查看
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 Video和Image I/O frameworks,使用一个GPU或CPU渲染路径。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 Images(Core 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.

翻译:CoreImage有十多个类别的过滤器。一些旨在实现艺术的效果,如使风格化和半色调过滤器类。其他则适合修复图像的问题,比如颜色调整和锐化滤镜。

Core Image can analyze thequality of an i
c73d
mage 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.

翻译:CoreImage可以分析一个图像的质量,并提供一组最佳设置的过滤器,调整这些东西的色调,对比度,色调和颜色,并纠正快闪伪像(例如红眼睛),它用一个方法做这一切来实现你要求的效果。

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.

翻译:
CIImageAccumulator
类是专为高效的基于反馈的图像进行处理,如果你的App需要反映动态系统的话。你可能会找到有用的信息。

相关章节 请查考
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.

在操作系统X中,您可以将一个或多个自定义筛选器作为图像单元,以便其他应用程序可以加载并使用它们。

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




SeeAlso(另请参阅)

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描述了用于创建自定义过滤器的内核例程的语言
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: