Code Monkey home page Code Monkey logo

opencv-ios's Introduction

OpenCV for iOS

Just Compilled OpenCV framework for iOS.

Update: Pod now uses framework downloaded from here, which supports 64 and 32-bit. Compiling for 64-bit didn't work, ran into same problems mentioned here.

Have different versions (see tags)

Usage:

Use .mm flies instead of .m (Objective-C++)

Add import:

#import <opencv2/opencv.hpp>

Installation with Cocoapods

Just add line in your Podfile:

pod 'OpenCV'

Instalation Manually

Download and add opencv2.framework to your project

Also add following frameworks to your project:

  • Accelerate
  • AssetsLibrary
  • AVFoundation
  • CoreGraphics
  • CoreImage
  • CoreMedia
  • CoreVideo
  • QuartzCore
  • UIKit
  • Foundation

Also add following libs :

  • libc++.dylib

OpenCV README

OpenCV: open source computer vision library

Homepage: http://opencv.org

Online docs: http://docs.opencv.org

Q&A forum: http://answers.opencv.org

Dev zone: http://code.opencv.org

Download: http://sourceforge.net/projects/opencvlibrary/files/opencv-ios/

opencv-ios's People

Contributors

exoticobjects avatar fl0p avatar kremens avatar t-unit avatar yig avatar yuao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencv-ios's Issues

Where to put #import <opencv2/opencv.hpp>?

Hi @Fl0p thanks for your efforts.
I would like to know where i have to put #import <opencv2/opencv.hpp> to use correctly the frameworks in the projects.
Actually i've imported all frameworks needed and i've no issued.
In the next days i'll try to use some opencv features in ios, can you help me to start?
Thanks in advance,
Simone

OpenCV 2.4.9

It seems someone else has published the podspec for 2.4.9 and has drastically altered the way it works and where the files come from. This is causing issues with our project and I'm attempting to get to the bottom of it. Any help on the matter would be greatly appreciated.

Missing symbols for i386 architecture

Hi,

really nice work, its a joy to use it with CococaPods.
But I got a problem while porting a opencv-project.
I miss some symbols for i386 Architecture (using iOS Simulator):

cv::drawKeypoints(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&, cv::Mat&, cv::Scalar_<double> const&, int)
cv::CascadeClassifier::load(std::string const&)
cv::DescriptorMatcher::radiusMatch(cv::Mat const&, std::vector<std::vector<cv::DMatch, std::allocator<cv::DMatch> >, std::allocator<std::vector<cv::DMatch, std::allocator<cv::DMatch> > > >&, float, std::vector<cv::Mat, std::allocator<cv::Mat> > const&, bool)
cv::merge(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, cv::_OutputArray const&)
cv::split(cv::Mat const&, std::vector<cv::Mat, std::allocator<cv::Mat> >&)
cv::imread(std::string const&, int)
cv::imshow(std::string const&, cv::_InputArray const&)
cv::putText(cv::Mat&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)
cv::FeatureDetector::detect(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat const&) const
cv::Feature2D::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const

What could be the problem here?
Any suggestions? Thanks in advance

Xcode - clang: error: linker command failed with exit code 1 (use -v to see invocation)

After pod installing,
I am facing this issue

duplicate symbol OBJC_CLASS$_Reachability in:
/Users/retributionxd/Library/Developer/Xcode/DerivedData/RevEye-doarrfgrbaqxejbxnrhmfdcgqgka/Build/Intermediates/RevEye.build/Debug-iphonesimulator/RevEye.build/Objects-normal/x86_64/Reachability.o
/Users/retributionxd/Desktop/amar/reveye/RevEye/WikitudeSDK.framework/WikitudeSDK(Reachability.o)
duplicate symbol OBJC_METACLASS$_Reachability in:
/Users/retributionxd/Library/Developer/Xcode/DerivedData/RevEye-doarrfgrbaqxejbxnrhmfdcgqgka/Build/Intermediates/RevEye.build/Debug-iphonesimulator/RevEye.build/Objects-normal/x86_64/Reachability.o
/Users/retributionxd/Desktop/amar/reveye/RevEye/WikitudeSDK.framework/WikitudeSDK(Reachability.o)
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Issue when installing the Pod

Simply when installing the Pod with no other Pods I get several build issues.

Would you know how to resolve this?

Undefined symbols for architecture x86_64:
  "_jpeg_free_large", referenced from:
      _free_pool in opencv2(jmemmgr.o)
  "_jpeg_free_small", referenced from:
      _free_pool in opencv2(jmemmgr.o)
      _self_destruct in opencv2(jmemmgr.o)
  "_jpeg_get_large", referenced from:
      _alloc_large in opencv2(jmemmgr.o)
      _alloc_barray in opencv2(jmemmgr.o)
  "_jpeg_get_small", referenced from:
      _jinit_memory_mgr in opencv2(jmemmgr.o)
      _alloc_small in opencv2(jmemmgr.o)
  "_jpeg_mem_available", referenced from:
      _realize_virt_arrays in opencv2(jmemmgr.o)
  "_jpeg_mem_init", referenced from:
      _jinit_memory_mgr in opencv2(jmemmgr.o)
  "_jpeg_mem_term", referenced from:
      _jinit_memory_mgr in opencv2(jmemmgr.o)
      _self_destruct in opencv2(jmemmgr.o)
  "_jpeg_open_backing_store", referenced from:
      _realize_virt_arrays in opencv2(jmemmgr.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Support OpenCV 3.0

Can you please make a version of the pod that supports open CV 3.0? I've had a hard time compiling it myself.

Doesn't work in 64-bit mode?

Could be my error...

I left the following comment here as well. Apologies if that's bad form, but there was an awful lot of discussion about this podspec on that thread.

<<<

I'm using the podspec successfully, to some degree - it works in 32-bit mode on the simulator, but not 64-bit. When running on 64-bit iPad or iPhone, I get errors like this:

Undefined symbols for architecture x86_64

I've been through Stackoverflow. There are lots of links. I've tried them all to no avail:

1, 2, 3, 4, 5, 6

Also, FWIW, OpenCV 2.4.7 is out. The last comment here indicates that they've ironed out some of the issues that have made it so difficult to work with in XCode in the past. Would be awesome to have the podspec updated to use it...

Unable to build project

Undefined symbols for architecture arm64:
"cv::findContours(cv::_InputOutputArray const&, cv::_OutputArray const&, cv::OutputArray const&, int, int, cv::Point)", referenced from:
-[OpenCVImgProcess OpenCVImgSeg:] in ThermaFySDK2_2(OpenCVImgProcess.o)
boundQuadrangle(cv::Mat&, std::_1::vector<cv::Point, std::_1::allocator<cv::Point > >&) in ThermaFySDK2_2(OpenCVImgProcess.o)
"cv::findContours(cv::_InputOutputArray const&, cv::OutputArray const&, int, int, cv::Point)", referenced from:
-[OpenCVImgProcess OpenCVImgSeg:] in ThermaFySDK2_2(OpenCVImgProcess.o)
MaxArea(cv::Mat&, cv::Mat&) in ThermaFySDK2_2(OpenCVImgProcess.o)
LongEdges(cv::Mat&, int, cv::Mat&) in ThermaFySDK2_2(OpenCVImgProcess.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

'list' file not found

When I import #import <opencv2/opencv.hpp> and try to run the app I get the following error for the file background_segm.hpp line 47:
'list' file not found

Installed with pods

Have you seen this before?

Duplicate symbol in build phase in 2.4.4 and 2.4.5

Use Cocoapod to integrate OpenCV.
2.4.3.2 builds well, however 2.4.4, 2.4.5 will run into following dup symbol problem:

duplicate symbol _ZThn4_NK2cv4SURF11computeImplERKNS_3MatERNSt3__16vectorINS_8KeyPointENS4_9allocatorIS6_EEEERS1 in:
/Users/mao/work/projects/cam/levitagram/iOS/Pods/OpenCV/opencv2.framework/opencv2(surf.o)
duplicate symbol __ZThn4_NK2cv4SURF14descriptorSizeEv in:
/Users/mao/work/projects/cam/levitagram/iOS/Pods/OpenCV/opencv2.framework/opencv2(surf.o)
duplicate symbol __ZThn4_NK2cv4SURF14descriptorTypeEv in:
/Users/mao/work/projects/cam/levitagram/iOS/Pods/OpenCV/opencv2.framework/opencv2(surf.o)
ld: 21 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

OpenCV 2.4.5, 2.4.6 released

Hi,
Please consider updating to newest stable OpenCV version. It has many bug fixes, better parallelization of algorithms and better camera preview handling on iOS platform, not to mention native conversion between UIImage and cv::Mat.

Full change log is available here http://code.opencv.org/projects/opencv/wiki/ChangeLog.
Compiled iOS frameworks are available here http://sourceforge.net/projects/opencvlibrary/files/opencv-ios/.

If I'll have time for update my apps during next few weeks I'll prepare a pull request but please consider doing it asap.

Cheers,
OG

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.