integrating cvblobslib in opencv - image-processing

here I have just started my fyp and ints gona be in opencv.
I needed to vectorize the image and in order to do that I chose to use cvblobslib.
I downloaded it and it was build successfully but when I use it in my project there's a link error saying that "could not open cvblobslib.obj"
the exact string is pasted below
fatal error LNK1104: cannot open file 'E:\Faizan\myWork\moCap\blobslib\Debug\cvblobslib.obj'
of the solutions which I found on net and tried on my project are to remove any spaces in path, build in release mode rather than in debug mode, but problem was not solved.
the thing is that the stated file does not get built with other files when cvblobslib is built, i.e it is not there in the stated folder.
any body please give a solution

What exactly are you trying to use the cvblobslib for? I also tried using this with no luck. I found that openCV has a lot of the same capabilities. For example, you can use cvCountours to detect "blobs" and filter them by area.
(ps. i tried leaving this as a comment. do you need certain amount of rep to do that?)

cvBlobsLib has been developed using Microsoft Visual C++ (6.0) and can also be used in .NET. A Linux version could be downloaded here.
cvBlobsLib is distributed in a static library (.lib). To use it, it is requred that you build the .lib file and later use that lib file in the desired project. To build the .lib file, simply open the MSVC++ project and build it (debug or release version).
To build the project where the library is to be used follow this steps (MSVC++ 6.0):
In Project/Settings/C++/Preprocessor/Additional Include directories add the directory where the blob library is stored
In Project/Settings/Link/Input/Additional library path add the directory where the blob library is stored and in Object/Library modules add the cvblobslib.lib file
Include the file BlobResult.h where you want to use blob variables.
In Project/Settings/C++/Precompiled Headers select Not use precompiled headers
NOTE: Verify that in the project where the cvblobslib.lib is used, the MFC Runtime Libraries are not mixed:
Check in Project->Settings->C/C++->Code Generation->Use run-time library of your project and set it to
Debug Multithreaded DLL (debug version) or to Multithreaded DLL ( release version ).
Check in "Project->Settings->General" how it uses the MFC. It should be "Use MFC in a shared DLL".
NOTE: The library can be compiled and used in .NET using this steps, but the menu options may differ a little
NOTE 2: In the .NET version, the character sets must be equal in the .lib and in the project. [OpenCV yahoo group: Msg 35500]
NOTE 3: cvBlobsLib might give errors when building with OpenCV v2.2 onwards. Try commenting out this line in file BlobLibraryConfiguration.h:
#define _SHOW_ERRORS
NOTE 4: If you are using the new cv::Mat for your images instead of the old IplImage, you can easily convert between them, such as by following the OpenCV C++ Cheatsheet.

Related

JUCE iOS build has no target

I have code for a VST plugin and need to port some of it to an iOS app.
I have tried building the OSX version and using the lib.a and it doesnt work. When I open the iOS version of it, Xcode shows that it is missing the tagret.
If I copy the code directly into Xcode with all the JUCE modules, and I set the header search paths, I get compilation errors on things like no such type for String
After this latest JUCE update, Xcode would give the same errors until I updated the JUCE file itself, so I think the JUCE build settings or configuration of the new version is doing something differently. How can I get this code into a different Xcode project, so that I can use it?
Can I compile it as a library and use the objects through the header?
JUCE is designed to be included in projects generated by the Introjucer / Projucer (the JUCE project management tool). Without this, the correct preprocessor definitions will not be set up.
If you really needed to include JUCE source code inside your program, you could manually set up these preprocessor definitions (take a look at the AppConfig.h header from a generated project to get an idea of how much work this will be), but you'd really be going against the normal "JUCE way".
Simply including the headers and linking against the library will not work without considerable effort, as the include structure is ... odd ... and there isn't any library to link against directly anyway (the generated projects contain all the JUCE source normally, so there's no need).
Adding the JUCE source files (i.e. .cpp and .mm) to be compiled in a project directly will result in compilation errors, as they need to be compiled in a very specific order which is mandated by the header file (the header files #include certain implementation files after setting up their dependencies).
In short, if you can at all I would advise generating the project with the Projucer and adding other source files in as you need them, rather than the other way around.

Create .dll with Visual Studio

I want to create my own .dll file with visual studio.
The problem is, that I have included Open CV inside my program, because I'm using a method from Open CV.
My question now is, is it possible to create my own .dll file although I'm using a Open CV library? Is the Open CV lib, included inside my own .dll than, or how does it work?
Thank and best wishes,
Andi!
I think you can do this in two ways:
Statically link OpenCV into your DLL
Run-time Dynamically link OpenCV from your DLL
The first one requires you to build OpenCV as a static library (output is a large .lib file, no .dll).
In your own DLL, you specify you want to link with opencv.lib.
The second one requires you to build OpenCV as a dynamic library (output is a small .lib file, and a big .dll).
In your own DLL, you would have to add code to manually load the OpenCV library and find the addresses of the functions you need to call from OpenCV (see https://msdn.microsoft.com/en-us/library/windows/desktop/ms685090%28v=vs.85%29.aspx)

How to avoid Xcode from doing an static analysis of all the files?

I have a project with sqlite3 amalgamated in it in a separate static lib project but xcode is burning my cpu since it's a 4MB source file. I can't find a way to say that exclude that file during the static analysis.
As kenji mentioned in their comment, create a static library from your custom sqlite source code and include that in your builds. It won't be recompiled each time and will not be analyzed. You can do this as an Xcode sub-project.
If you check your analyse logs in xcode, you'll see that it's don't analyse resources (pngs, jpgs, xib, etc) files.
If you look at the usage of the clang analyzer (which is integrated into xcode), it says :
"The scan-build command can be used to analyze an entire project by essentially interposing on a project's build process. This means that to run the analyzer using scan-build, you will use scan-build to analyze the source files compiled by gcc during a project build. This means that any files that are not compiled will also not be analyzed."
Extracted from : http://clang-analyzer.llvm.org/scan-build.html

how can I debug with the OpenCV source code

I am using VS2010 with OpenCV 2.3.1, and opencv is installed by using OpenCV-2.3.1-win-superpack. Now I want to understand the facedetect sample (opencv\samples\c\facedetect.cpp) in detail, I wanna know how to process the specific xml feature file (haarcascade_frontalface_alt.xml), and how to decide which feature to be used. These are all
in the CascadeClassifier class, but when I use "go to definition", the result file is a .hpp
head file, so where is the implementation file? when I use vs2010 to debug, the debugger can not locate the implementation file either. some advice?
Add the opencv\modules directory to the 'source' entry in the vs-directories tab in the project settings. And make sure the pdb files are in the same directory as the debug dlls

import existing source code as referenced library in eclipse

I have some source codes from a friend that I would like to use as referenced library in my BlackBerry project. I'm not sure about how to package the source codes into a .jar file. I tried exporting the source to a JAR file and import it as external JAR in my project, it's giving me missing stack map error. I tried to preverify the .jar file generated from the source using the provided preverification tool from BlackBerry JDE, it didn't give me any output folder.
In fact, I'm not sure if the way I export the source is correct. Can anyone provide step-by-step instructions on how to package existing source code into a valid JAR file that can be imported into my project as a referenced library?
Again, I'm using eclipse.
I fought with this issue for months...
I have two solutions for you:
A-If you plan on having this library in more than one Application:
I posted my solution at the bottom of my original question: Blackberry Apps - Importing a code-signed jar into an application project
The basic solution was to build the library as a cldc project (plus some other magic), not as a library project. I actually had to open a case with RIM support to figure this out, it was a hot mess... Our case was complicated in that more than one application would have a copy of our "Library" and our library had to be signed. Which caused weird issues when two ALX files (from two different apps) both had the same signed library file.
The nice thing about this solution is that adding the library to the Application doesn't force you to have multiple COD files.
B - If your Jar is only going to be in one Application:
Then you should follow these instructions: http://supportforums.blackberry.com/t5/Java-Development/Eclipse-1-1-can-I-add-external-3-d-party-JAR-library/m-p/486787#M98033

Resources