Any way to check opencv version in iOS project? - ios

In the iOS project (with no cocoaPods), openCV is used.
And the one who create this project can not be contacted because he went to other company.
I realized in the project, openCV framework name is openCV2.framework, so I assume version is 2.x.x.
But I can not find any clue about the version anymore.
In the code, no version is mentioned.
I want to know the version for security reason.
Any way to check opencv version in iOS project ?

If you the framework file in the exact version, it is defined in there.
std::cout << CV_VERSION << std::endl;
(assuming C++)
If you don't have the dependencies, you can only look for strings in the binary or estimate from what features are used.

There is an easier way of checking OpenCV version if you have access to the project's source code. Just take a look to the file opencv2.framework/Versions/Current/Resources/Info.plist. Key CFBundleVersion contains the version number you are looking for. Here you have the contents of said file for version 4.1.0:

Related

Get the RestKit version number in code (from CocoaPods or static lib)

Im planning to add a text within an app stating what RestKit version the app is currently using. So I wonder if there is an easy way to get the current version number of the RestKit installed via CocoaPods.
...Or, is there a way to check the version of the staticlib libPods-RestKit.a?
No, there isn't. The version number is held in a file in the project but this file isn't built into the library and there is no API provided to get the version number. There is no standard method for providing version numbers in static libraries so this isn't a frequent requirement.
Anything you do would be an explicit solution on your part. Your best option would likely be to fork the RestKit repo and make some small changes or to reference the VERSION file from the RestKit project in your main project so it's copied into the app and you can read it from disk at runtime...

adding libz.1.2.3.dylib vs libz.1.1.3.dylib or libz.1.2.5.dylib

I am following this tutorial
The tutorial states to add libz.1.2.3.dylib. library, but because I have downloaded newer or older library (I don't know exactly if my library is newer or older that the library in the tutorial, but 99% it is newer). So, when I tried to add the libz.1.2.3.dylib. library, I didn't find it. However, when I typed libz I found these choices:
which one should I choose please?
In using dynamic libraries the one you normally use is libX.major_version.dylib in this case libz.1.2.dylib. This is a link to a library libX.major_version.minor_version.dylib which here is libz.1.2.5.dylib
The rationale for this is that the major version is changed only when the API is changed, the minor version is updated when any change is made. Thus your program should work when it uses any of the same major version and so you want the latest version.
In this case the tutorial had an older install and so its libz.1.2.dylib. should have pointed to libz.1.2.3.dylib.
For you you should use libz.1.2.5.dylib which should be like the tutorials version but with bug fixes and possibly extra functions that don't matter here as the tutorial won't call the new functions.
Normally libX.1.x.dylib would be older than libX.2.y.dylib but the writers might produce bug fixes to the old API whilst also working on the new API
Following on from the rational I gave libz.dylib should be a link to the highest number library but I would not use it as you are writing to a particular API so I would use a version specific (In this case if missing a link the I would not trust what libz.dylib points to)

cannot setup Opencv 2.4.6 , opencv_core231d.lib Not Found Error

Hello everyone;
i had opencv 2.2 on my vs2010, and i wanted to update so i went to opencv site and:
i've downloaded OpenCV for Windows (ver 2.4.6)
i've extracted it to c:\opencv2.4
i've set the Environment Variable as doc said here: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windowssetpathandenviromentvariable
( i didnt know what is "PATH EDITOR" so i've just changed Environment variables)
i made property sprite sheets as opencv doc said here: http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
5.but Doc Was Old, and there was no "include" folder in OpenCV2.4/opencv/build/x64/vc10 so I did set include Directory to OpenCV2.4/opencv/build/include in My property sprite sheet.
everything seems true and VS detect include libraries But
VS2010 throw following error when i want to Build the solution:
1>LINK : fatal error LNK1104: cannot open file 'opencv_core231d.lib'
Strange thing is there is no "opencv_core231d.lib" File in c:\opencv2.4 at all!!!
:(
what is the problem?
This is a Linker error, so make sure you are trying to link the correct libraries.
I would suggest to use CMake, which definitely simplifies configuring projects, specially those having dependencies like OpenCV (you can take a look to the OpenCV documentation, or any blog explaining the steps: http://marcosnietoblog.wordpress.com/2011/11/19/opencv-for-windows-easy-installation-using-cmake/ )
By the way, I use to have several versions of opencv on the same folder:
C:\OpenCV\opencv2.4.3
C:\OpenCV\opencv2.4.6
...
So I can easily switch within CMake setting the OpenCV_DIR.
opencv_core231d.lib is a debug version, all the *d.lib and *d.dll files in openCV are with debug symbols.
It is likely that the pre-built release you downloaded doesn't contain debug ones.
either download te source and build both debug and release. Or, if you don't care how opencv works internally, just change the linker flags to use the same lib names with the d
edit. or of course if you donwloaded opencv 2.4.6 the file would be opencv_core246d.lib

OpenCV 2.4.4 and Tesseract 3.02.02 Don't link together

I'm using iOS 6.1 and XCode 4.6
I have a problem, OpenCV needs to be compiled with libc++ (LLVM C++ 11), while Tesseract 3.02.03 needs to be compiled with "default compiler".
How can I overcome this problem. at this point I can compile and link only If I comment out OpenCV code or comment out OCR code. cannot make them both work together.
Any ideas??
I am by no means an expert with C++ but I had the same problem and by some trial and error and lots of internet searching I think I managed to solve it.
As I understand it, the problem is that opencv and tesseract are built with different standard libraries. The latest opencv is built with libc++ while tesseract is built with stdlibc++
The solution is to rebuild one of them so they both use the same standard library. I decided to recompile tesseract and followed the instructions found here which references a build script that is used to build the library.
I modified this script (again, by trial an error, not really sure this is the best way) to used the clang++ compiler (CXX="/usr/bin/clang++") and use libc++ (CXXFLAGS="$CFLAGS -stdlib=libc++") and it compiles (albiet with some warnings). You may also need to copy some headers as the script doesn't seem to copy them all.
Then just use this library instead of the downloaded one in your iOS project (remember to change back to libc++ in build settings) and everything will compile and link just fine.
So far it seems to work properly in runtime.

How to use sharpziplib in Monotouch?

Hi I need to unzip a file in Monotouch for an iOS (and Andriod later) App and sharpziplib looks like a good choice (is it?). But how do I go about adding it in MonoDevelop (I have the latest version)?
I have downloaded ICSharpCode.SharpZipLib.dll, but how/where is it added to my project (solution)? Can anyone give me step-by-step instructions?
Also which .net version of the DLL should I be using? There are three: net-11, net-20, netcf-20 (i think it's the last one but would be good to have that confirmed).
You must create a MonoTouch class library project for ICSharpCode.SharpZipLib and add the corresponding source files to that project.
Then you can either reference the resulting assembly or the project itself in your solution.

Resources