Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Computer Vision Projects with OpenCV 4 and C++

You're reading from   Building Computer Vision Projects with OpenCV 4 and C++ Implement complex computer vision algorithms and explore deep learning and face detection

Arrow left icon
Product type Course
Published in Mar 2019
Publisher
ISBN-13 9781838644673
Length 538 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Roy Shilkrot Roy Shilkrot
Author Profile Icon Roy Shilkrot
Roy Shilkrot
David Millán Escrivá David Millán Escrivá
Author Profile Icon David Millán Escrivá
David Millán Escrivá
Vinícius G. Mendonça Vinícius G. Mendonça
Author Profile Icon Vinícius G. Mendonça
Vinícius G. Mendonça
Prateek Joshi Prateek Joshi
Author Profile Icon Prateek Joshi
Prateek Joshi
Arrow right icon
View More author details
Toc

Table of Contents (28) Chapters Close

Title Page
Copyright and Credits
About Packt
Contributors
Preface
1. Getting Started with OpenCV FREE CHAPTER 2. An Introduction to the Basics of OpenCV 3. Learning Graphical User Interfaces 4. Delving into Histogram and Filters 5. Automated Optical Inspection, Object Segmentation, and Detection 6. Learning Object Classification 7. Detecting Face Parts and Overlaying Masks 8. Video Surveillance, Background Modeling, and Morphological Operations 9. Learning Object Tracking 10. Developing Segmentation Algorithms for Text Recognition 11. Text Recognition with Tesseract 12. Deep Learning with OpenCV 13. Cartoonifier and Skin Color Analysis on the RaspberryPi 14. Explore Structure from Motion with the SfM Module 15. Face Landmark and Pose with the Face Module 16. Number Plate Recognition with Deep Convolutional Networks 17. Face Detection and Recognition with the DNN Module 18. Android Camera Calibration and AR Using the ArUco Module 19. iOS Panoramas with the Stitching Module 20. Finding the Best OpenCV Algorithm for the Job 21. Avoiding Common Pitfalls in OpenCV 1. Other Books You May Enjoy Index

OpenCV stitching in an Objective-C++ wrapper


For working in iOS, OpenCV provides its usual C++ interface that can be invoked from Objective-C++. In recent years, however, Apple has encouraged iOS application developers to use the more versatile Swift language for building applications and forgo Objective-C. Luckily, a bridge between Swift and Objective-C (and Objective-C++) can be easily created, allowing us to invoke Objective-C functions from Swift. Xcode automates much of the process, and creates the necessary glue code.

To start, we create a new file (Command-N) in Xcode and select Cocoa Touch Class, as shown in the following screenshot:

Choose a meaningful name for the file (for example, StitchingWrapper) and make sure to select Objective-C as the language, as shown in the following screenshot:

Next, as shown in the following screenshot, confirm that Xcode should create a bridging header for your Objective-C code:

This process will result in three files: StitchingWrapper.h, StitchingWrapper...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image