Book Image

iOS Application Development with OpenCV 3

By : Joseph Howse
4 (1)
Book Image

iOS Application Development with OpenCV 3

4 (1)
By: Joseph Howse

Overview of this book

iOS Application Development with OpenCV 3 enables you to turn your smartphone camera into an advanced tool for photography and computer vision. Using the highly optimized OpenCV library, you will process high-resolution images in real time. You will locate and classify objects, and create models of their geometry. As you develop photo and augmented reality apps, you will gain a general understanding of iOS frameworks and developer tools, plus a deeper understanding of the camera and image APIs. After completing the book's four projects, you will be a well-rounded iOS developer with valuable experience in OpenCV.
Table of Contents (13 chapters)
iOS Application Development with OpenCV 3
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Sharing an image via social media


If LightWork successfully saved the image to the Photos library, we want to show the user another alert with sharing options. The following method checks the availability of various social media platforms and builds an alert with an action button for each available platform. Despite targeting different social media platforms, the action buttons are similar to each other, so we build them in a helper method, shareImageActionWithTitle:serviceType:image:. We also provide a Do not share action button that does nothing except stop the app's busy mode:

- (void)showSaveImageSuccessAlertWithImage:(UIImage *)image {
  
  // Create a "Saved image" alert.
  UIAlertController* alert = [UIAlertController
    alertControllerWithTitle:@"Saved image"
    message:@"The image has been added to your Photos library. Would you like to share it with your friends?"
    preferredStyle:UIAlertControllerStyleAlert];
  
  // If the user has a Facebook account on this device, add a...