Affine-SIFT(ASIFT) Feature Detector - opencv

I am working on a project where I have to detect the features of an object (in a Video Frame) and match it with other objects (inside some other frame) to recognize the same object for tracking. I have googled many Feature detector algorithms. I also did some comparisons between them (SIFT,SURF & ASIFT).
ASIFT is computationally a bit expensive but the results are more accurate when compared to SIFT & SURF.
I have googled a lot about ASIFT but did not get any success regarding my project.
Can someone please help me with using ASIFT in my project?
ASIFT reference:
http://www.ipol.im/pub/algo/my_affine_sift/
Which files should I include in my project? I'm working on OPENCV 2.1 , IDE VS 2010.
Its my first post on this platform. Hope some one will help me.

The important functions are in the files compute_asift_keypoints.{c,h} and compute_asift_matches.{c,h}. They will inform you about which functions are mandatory. From there you have the choice:
Quick-and-dirty way:
you need to include and compile everything, except the executable part (file demo_*.cpp). You can either compile the files as a library (by modifying the CMakeLists.txt) or add them to your project in your IDE. Note that you will not use the functions from io_png for example, but you need to compile them if you don't want to be annoyed by compiler errors about missing functions.
Clean (but longer) way:
you have to ignore / remove all the files that also contain the I/O part, since OpenCV can take care of them. Then you can also look for functions that are already implemented in OpenCV, such as applying an affine transform, SVD... and progressively replace them by their OpenCV counterpart.

Related

opencv not able to run some advanced image processing code

i am using visual studio 15
some basic blurring and filters are running perfectly but on some codes such as blending and dct techniques are not running
Can anyone please help me
At this point its probably best to create your own compiled library tools for MicroSoft Visual Studio 15. Here's a how to guide. That guide covers all the steps and starts with the most current code on Github.
Also note there are many tutorials out there on OpenCV. Many parts of the OpenCV library have been update, or replaced. You have to be careful that the commands you are using are valid in OpenCV 3.x
Compile your own, run a few simple programs.
If you want specific help here, you MUST post your code, and the errors you are seeing.

What is the deference between OpenCV2.4.10 and JavaCV 0.10

I want to know if I download the OpenCV2.4.10, is there the need of JavaCV 0.10 or not, because in the extracted folder of OpenCV2.4.10 inside \OpenCV\build\java there is a Jar file named opencv-2410.jar. I am using Java Language to use OpenCV library. But I also saw JavaCV which can be found at http://bytedeco.org website, when I downloaded all Jars, here I also found named opencv.jar file. Now I don't know what is the deference between them, in Java Language which one is better to use. If use OpenCV2.4.10 is need to JavaCV 0.10? and if use JavaCV 0.10 is need to OpenCV2.4.10? or both of them can be independent used? the If anyone know about this please tell me, Thanks in advance!!
OpenCV library is written in C/C++. Java wrappers are written so that, C/C++ code could be invoked with JNI. JavaCV( unofficial ) and OpenCV( official ) are completely independent java wrappers to use OpenCV from Java.
I suggest you use OpenCV downloaded from offical opencv.org website or from OpenCV github repo(1). Here java wrappers are auto generated during build and so all C/C++ OpenCV functions will have corresponding Java wrappers. This way, every new release or even development versions of OpenCV could be used from Java. This also helps with reading documentation as function parameters matches nearly.
JavaCV is a popular Java wrapper for OpenCV maintained by independent developer(s). It also add helper classes for easier usage. But here, wrappers are not auto generated and so you will need to wait for developers to update to newer versions.

Opencv source code for all the platforms

My question is related to the source codes of Opencv. It seems to me for different platform the Opencv website provides different code structures. I just wondering whether it is possible to have one source code for all the different platforms. With the same source code, I can compile for different platforms. Thanks.
The OpenCV source code is on GitHub.. Just choose the version you need, download and build away to your heart's content. HTH

Fingeprint thinning code preserving continuity of ridges

I am trying to develop a project that involves fingerprint matching. Now, I am stuck at the stage of Fingerprint thinning. I am coding my project using OpenCV and c++ Visual Studio 2010.
I tried erode() function, but it doesn't preserve the continuity of ridge lines. I also tried the following algorithm of Zhang-Suen thinning,
http://opencv-code.com/quick-tips/implementation-of-thinning-algorithm-in-opencv/
but, this shows an exception at memory location. I don't know how to proceed and i am stuck with this step.
Kindly help me with the code for fingerprint thinning + also preserving continuity of ridges.
If you're just looking for a code example of extraction, SourceAFIS (BSD License) goes from full greyscale to binarized and thinned with some artifact trimming as well and then identifies minutia. It's written in c# but it might give you some bright ideas.

Java: How to open a library?

I want to open libraries, because currently I want to see the algorithms used for drawing, modify them and implement them in my program. For example: I have tried to create an algorithm on my own for lines. But I failed. And even if I had succeeded, I fear that it might not give the same result as the algorithm in the libraries. And I don't want this to happen. That's why I want to copy the algorithms used for the methods in libraries. And I really hope that this will help me create the application I'm currently working on and with other applications in the future.
I tried to open the libraries with a code editor. But I had troubles finding the libraries- I don't really know where are they placed nor in what files are their codes stored.
How to open a Java library? Or is there a place in the Internet where the code is uploaded?
It sounds like what you want is to get inside the standard Java libraries (so you can see the code for methods like Graphics.drawLine()).
You can download the source files from the same place you got the JDK, if you are on Windows or Linux. For the Mac, see this question. You can even set up Eclipse so that you can debug into that source as if it were your own code.
However, you will probably not find line-drawing code in Java in these libraries - the Graphics implementation will almost certainly use native methods, and may just call existing methods in the OS.
If you are specifically looking for line drawing algorithms, another option would be to look at the Wikipedia page for the Bresenham (aliased) or Wu (antialiased) algorithm.
Edit:
The part of a Graphics2D call that actually puts pixels on the screen is probably inside a system call and therefore the source would not be available.
A java vector graphics library like Batik might have source for some of these algorithms, but probably relies on the Graphics2D calls for most of them. So, you might look for a comprehensive vector graphics library written in a language other than Java, where those graphics calls do not already exist by default.
Alternately, checking the table of contents for a computer graphics book might point you at a variety of algorithms that you could look up on Wikipedia.
For any given library:
Make sure to obey all licenses when using another's code
If you are referring to the Java SDK source code, you can find it here: http://grepcode.com/
If the project is open source, you can usually just get the source from the project website. No problem, though make sure to obey their license.
If the project is NOT open source, well, then you're in a pickle licensing wise, so I do NOT endorse this, however, you would need to use a Java Decompiler such as JD-Gui
As far as what drawing algorithms to use, there are so many different ones (obviously, people have been trying to draw quickly for many many years), your best bet is to figure out exactly what you need to do and then search for that specific need separately. There isn't really a good repository of ALL of them, except maybe wikipedia.
If you are using the libraries they are on your classpath. Check out how to figure out your classpath in whichever IDE you are using and you can find the JARs you depend on. If they are packaged with sources all you need to do it unjar them and look at the sources.
If you don't have access to the sources you can get the code using a Java Decompiler.
If you are trying to look at a standard Java library, see the other answers about getting the source to the JDK.
If you are interested in an open source library (such as something maintained by the Apache project), look on the site of the project for a 'source jar' which you can open with a standard zip utility.
If the library you want is not open source or you cannot find the source for it, you can try to decompile it. If you are using Eclipse, try this decompiler.

Resources