SlideShare une entreprise Scribd logo
1  sur  8
Télécharger pour lire hors ligne
Core Image
Steve Zhou & Heidi Hansen
What is a Digital Image?
• It’s a collection of pixels and each pixel represents a specific
color.
• Combining hundreds and thousands of pixels together forms a
digital image.
• It’s a 2-dimensional arrays of pixels: X and Y or Rows and
Columns.
• Usually digital image refers to raster image or bitmap image.
What is Core Image?
•It’s an image processing framework on both iOS and OS X. It was first
introduced in iOS 5 and previously was only available on OS X.
•Its designed to do “real-time” image processing at pixel level for both
still image and video.
•It operates on image data types from multiple sources. ex: Core
Graphics,Core Video, Image I/O
•It allows developers to process images easily and efficiently without
dealing with low level interactions with GPU or CPU.
•It provides more than 90 built-in image processing filters in iOS, Feature
detection capability, and support for automatic image enhancement. 



Key Core Image Classes	
• CIImage: 

1. An object that represents an image.

2. You can create CIImage object with different inputs.



• CIFilter:

1. An object that represents an effect. 

2. Has at least one input parameter.

3. Produces a CIImage object.



• CIContext: 

1.An object that draws the result produced by CIFilter

using either CPU or GPU rendering path.
Apply Filter To An Image
1. CIContext *context = [CIContext contextWithOptions:nil];

2. CIImage *beginImage =[[CIImage alloc] initWithImage:[UIImage
imageNamed:@“waterfall.jpg”]];

3. CIFilter *filter = [CIFilter filterWithName:@“CIGammaAdjust"];"
"
[filter setValue:beginImage forKey:kCIInputImageKey];"
"
[filter setValue:@2.0 forKey:@"inputPower"];"
"
4. CIImage *resultImage = [filter outputImage];"
!
5. CGImageRef cgimage = [context createCGImage:resultImage fromRect:
[resultImage extent]];

6. UIImage *newImage = [UIImage imageWithCGImage:cgimage];"
Chaining Multiple Filters
1.CIImage *beginImage =[[CIImage alloc] initWithImage:[UIImage
imageNamed:@“waterfall.jpg”]];!
2.CIImage *firstOutPutImage=[CIFilter filterWithName:@"CISepiaTone"

keysAndValues: kCIInputImageKey beginImage,
@"inputIntensity", @0.8, nil].outputImage;!
3.CIImage *secondOutPutImage=[CIFilter filterWithName:@"CIHueAdjust"

keysAndValues: kCIInputImageKey firstOutPutImage,
@"inputIntensity", @0.8, nil].outputImage;!
4.CIImage *thirdOutPutImage=[CIFilter filterWithName:@"CIVibrance"

keysAndValues: kCIInputImageKey secondOutPutImage,
@"inputIntensity", @0.8, nil].outputImage;!
!
!
!
!
!
begin
Image
CISepiaTone CIHueAdjust
CIVibrance
Core Image Built-In Filters
• CIBoxBlur

• CIDiscBlur
• CIGaussianBlur
• CIMedianFilter
• CIMinimumComponent
• CIPhotoEffectChrome
• CIPhotoEffectFade
• CIPhotoEffectInstant
• CICircularScreen
• CICMYKHalftone
• CIDotScreen
• CIHatchedScreen
• CIAffineClamp
• CIAffineTile
• CIEightfoldReflectedTile
• CIFourfoldReflectedTile
• CIFourfoldRotatedTile
• CIOverlayBlendMode
• CISaturationBlendMode
• CIScreenBlendMode
• CISoftLightBlendMode
• CIColorMap
• CIColorMonochrome
• CIColorPosterize
• CIFalseColor
Steve Zhou & Heidi Hansen
!
Thanks! Demo/Questions?

Contenu connexe

En vedette

Digital watermarking
Digital watermarkingDigital watermarking
Digital watermarking
rupareliab14
 

En vedette (12)

iOS GPUImage introduction
iOS GPUImage introductioniOS GPUImage introduction
iOS GPUImage introduction
 
Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...
Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...
Secure Multi-Party Negotiation: An Analysis for Electronic Payments in Mobile...
 
Image compression Algorithms
Image compression AlgorithmsImage compression Algorithms
Image compression Algorithms
 
Gpu Programming With GPUImage and Metal
Gpu Programming With GPUImage and MetalGpu Programming With GPUImage and Metal
Gpu Programming With GPUImage and Metal
 
Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)
Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)
Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Digital Watermarking
Digital WatermarkingDigital Watermarking
Digital Watermarking
 
Digital watermarking
Digital watermarkingDigital watermarking
Digital watermarking
 
Image Processing and Computer Vision in iOS
Image Processing and Computer Vision in iOSImage Processing and Computer Vision in iOS
Image Processing and Computer Vision in iOS
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 
Image Processing Basics
Image Processing BasicsImage Processing Basics
Image Processing Basics
 
Introduction to digital image processing
Introduction to digital image processingIntroduction to digital image processing
Introduction to digital image processing
 

Similaire à What's a Core Image? An Image-Processing Framework on iOS and OS X

FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsFI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS Basics
Petr Dvorak
 

Similaire à What's a Core Image? An Image-Processing Framework on iOS and OS X (20)

What is image in Swift?/はるふ
What is image in Swift?/はるふWhat is image in Swift?/はるふ
What is image in Swift?/はるふ
 
iOS Training Session-3
iOS Training Session-3iOS Training Session-3
iOS Training Session-3
 
Image processing for robotics
Image processing for roboticsImage processing for robotics
Image processing for robotics
 
Python master class 3
Python master class 3Python master class 3
Python master class 3
 
【Unite 2017 Tokyo】ScriptableObjectを使ってプログラマーもアーティストも幸せになろう
【Unite 2017 Tokyo】ScriptableObjectを使ってプログラマーもアーティストも幸せになろう【Unite 2017 Tokyo】ScriptableObjectを使ってプログラマーもアーティストも幸せになろう
【Unite 2017 Tokyo】ScriptableObjectを使ってプログラマーもアーティストも幸せになろう
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
 
FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsFI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS Basics
 
How to add InLife to your game
How to add InLife to your gameHow to add InLife to your game
How to add InLife to your game
 
Developing VR Experiences with Unity
Developing VR Experiences with UnityDeveloping VR Experiences with Unity
Developing VR Experiences with Unity
 
Building VR Applications For Google Cardboard
Building VR Applications For Google CardboardBuilding VR Applications For Google Cardboard
Building VR Applications For Google Cardboard
 
iOS Game Development With UIKit
iOS Game Development With UIKitiOS Game Development With UIKit
iOS Game Development With UIKit
 
HTML5 Animation in Mobile Web Games
HTML5 Animation in Mobile Web GamesHTML5 Animation in Mobile Web Games
HTML5 Animation in Mobile Web Games
 
Mobile AR Tutorial
Mobile AR TutorialMobile AR Tutorial
Mobile AR Tutorial
 
01 foundations
01 foundations01 foundations
01 foundations
 
Cardboard VR: Building Low Cost VR Experiences
Cardboard VR: Building Low Cost VR ExperiencesCardboard VR: Building Low Cost VR Experiences
Cardboard VR: Building Low Cost VR Experiences
 
First kinectslides
First kinectslidesFirst kinectslides
First kinectslides
 
cs247 slides
cs247 slidescs247 slides
cs247 slides
 
Deploy Real-Time Object Detectors on Intel® Movidius™ Neural Compute Stick
Deploy Real-Time Object Detectors on Intel® Movidius™ Neural Compute StickDeploy Real-Time Object Detectors on Intel® Movidius™ Neural Compute Stick
Deploy Real-Time Object Detectors on Intel® Movidius™ Neural Compute Stick
 

Plus de Flatiron School

Plus de Flatiron School (13)

How to Leverage Your Network to Land Your First Job as a Developer
How to Leverage Your Network to Land Your First Job as a DeveloperHow to Leverage Your Network to Land Your First Job as a Developer
How to Leverage Your Network to Land Your First Job as a Developer
 
Pay and Get Paid: How To Integrate Stripe Into Your App
Pay and Get Paid: How To Integrate Stripe Into Your AppPay and Get Paid: How To Integrate Stripe Into Your App
Pay and Get Paid: How To Integrate Stripe Into Your App
 
Pick-a-Plex App: The Pinnacle of Cinema Experiences
Pick-a-Plex App: The Pinnacle of Cinema ExperiencesPick-a-Plex App: The Pinnacle of Cinema Experiences
Pick-a-Plex App: The Pinnacle of Cinema Experiences
 
Play Music...With Your Head: A Theremin App For Everyone
Play Music...With Your Head: A Theremin App For EveryonePlay Music...With Your Head: A Theremin App For Everyone
Play Music...With Your Head: A Theremin App For Everyone
 
Four Days Out: Quick Itineraries For Last-Minute Dates
Four Days Out: Quick Itineraries For Last-Minute DatesFour Days Out: Quick Itineraries For Last-Minute Dates
Four Days Out: Quick Itineraries For Last-Minute Dates
 
Into to Node.js: Building Fast, Scaleable Network Applications
Into to Node.js: Building Fast, Scaleable Network ApplicationsInto to Node.js: Building Fast, Scaleable Network Applications
Into to Node.js: Building Fast, Scaleable Network Applications
 
Intro to D3: Data-Driven Documents
Intro to D3: Data-Driven DocumentsIntro to D3: Data-Driven Documents
Intro to D3: Data-Driven Documents
 
Database Opt
Database Opt Database Opt
Database Opt
 
Citi Bike Finder
Citi Bike FinderCiti Bike Finder
Citi Bike Finder
 
FOMO No Mo'
FOMO No Mo' FOMO No Mo'
FOMO No Mo'
 
JSON overview and demo
JSON overview and demoJSON overview and demo
JSON overview and demo
 
Creating Ruby Gems
Creating Ruby Gems Creating Ruby Gems
Creating Ruby Gems
 
Form Helpers
Form Helpers Form Helpers
Form Helpers
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

What's a Core Image? An Image-Processing Framework on iOS and OS X

  • 1. Core Image Steve Zhou & Heidi Hansen
  • 2. What is a Digital Image? • It’s a collection of pixels and each pixel represents a specific color. • Combining hundreds and thousands of pixels together forms a digital image. • It’s a 2-dimensional arrays of pixels: X and Y or Rows and Columns. • Usually digital image refers to raster image or bitmap image.
  • 3. What is Core Image? •It’s an image processing framework on both iOS and OS X. It was first introduced in iOS 5 and previously was only available on OS X. •Its designed to do “real-time” image processing at pixel level for both still image and video. •It operates on image data types from multiple sources. ex: Core Graphics,Core Video, Image I/O •It allows developers to process images easily and efficiently without dealing with low level interactions with GPU or CPU. •It provides more than 90 built-in image processing filters in iOS, Feature detection capability, and support for automatic image enhancement. 
 

  • 4. Key Core Image Classes • CIImage: 
 1. An object that represents an image.
 2. You can create CIImage object with different inputs.
 
 • CIFilter:
 1. An object that represents an effect. 
 2. Has at least one input parameter.
 3. Produces a CIImage object.
 
 • CIContext: 
 1.An object that draws the result produced by CIFilter
 using either CPU or GPU rendering path.
  • 5. Apply Filter To An Image 1. CIContext *context = [CIContext contextWithOptions:nil];
 2. CIImage *beginImage =[[CIImage alloc] initWithImage:[UIImage imageNamed:@“waterfall.jpg”]];
 3. CIFilter *filter = [CIFilter filterWithName:@“CIGammaAdjust"];" " [filter setValue:beginImage forKey:kCIInputImageKey];" " [filter setValue:@2.0 forKey:@"inputPower"];" " 4. CIImage *resultImage = [filter outputImage];" ! 5. CGImageRef cgimage = [context createCGImage:resultImage fromRect: [resultImage extent]];
 6. UIImage *newImage = [UIImage imageWithCGImage:cgimage];"
  • 6. Chaining Multiple Filters 1.CIImage *beginImage =[[CIImage alloc] initWithImage:[UIImage imageNamed:@“waterfall.jpg”]];! 2.CIImage *firstOutPutImage=[CIFilter filterWithName:@"CISepiaTone"
 keysAndValues: kCIInputImageKey beginImage, @"inputIntensity", @0.8, nil].outputImage;! 3.CIImage *secondOutPutImage=[CIFilter filterWithName:@"CIHueAdjust"
 keysAndValues: kCIInputImageKey firstOutPutImage, @"inputIntensity", @0.8, nil].outputImage;! 4.CIImage *thirdOutPutImage=[CIFilter filterWithName:@"CIVibrance"
 keysAndValues: kCIInputImageKey secondOutPutImage, @"inputIntensity", @0.8, nil].outputImage;! ! ! ! ! ! begin Image CISepiaTone CIHueAdjust CIVibrance
  • 7. Core Image Built-In Filters • CIBoxBlur
 • CIDiscBlur • CIGaussianBlur • CIMedianFilter • CIMinimumComponent • CIPhotoEffectChrome • CIPhotoEffectFade • CIPhotoEffectInstant • CICircularScreen • CICMYKHalftone • CIDotScreen • CIHatchedScreen • CIAffineClamp • CIAffineTile • CIEightfoldReflectedTile • CIFourfoldReflectedTile • CIFourfoldRotatedTile • CIOverlayBlendMode • CISaturationBlendMode • CIScreenBlendMode • CISoftLightBlendMode • CIColorMap • CIColorMonochrome • CIColorPosterize • CIFalseColor
  • 8. Steve Zhou & Heidi Hansen ! Thanks! Demo/Questions?