Equivalence of cvMatchTemplate() in BoofCV or pure java computer vision library? - java

I am looking for solutions BoofCV or any pure java computer vision library that doesn't require OpenCV to do template matching of images to detect object within a picture.
For example, finding the position of an image within a bigger picture.
I have had success with cvMatchTemplate() example on OpenCV, but interested in using BoofCV to achieve the same results.

This functionality has recently been added to BoofCV. See example below:
http://boofcv.org/index.php?title=Example_Template_Matching

It seems this functionality is not implemented in BoofCV.

Related

OpenCv Java CvKNearest usage

I am writing a Java application what does feature matching with OpenCV 2.4.10.
The inputs of the program are two images and now the program searches the matching keypoints of the two images with SURF algorythm.
My problem is I cannot filter the good matches. I read that the K-Nearest neighbour algorythm is the solution of my problem and there is an implementation in the OpenCV library. I found some example code with Google but these examples are written in C and the C interface of this feature is different from the Java interface.
Can anyone show me an example for this feature?
How can I use the CvKNearest.train() and the CvKNearest.find_nearest() functions in Java?
i once used open cv 3.0 version and that was for a small application and
i never wanted to implement c methods ,,
bt see the article maybe this could help to call c methods in java
http://cs-people.bu.edu/dgurari/OpenCVwithJava.html

java library to extract descriptors of an image

I've done lots of researches to find a library with predefined functions that detect the descriptors of an image(color, form, texture) like the dominant color, Gabor Filtring ..
I've found more than one library but they are all used with c++
if anyone know any library to use with java language I would really appreciate your help
Consider ImageMagick
To use it from java code, use IM4JAVA
Also check this article: "Determining dominant color"

Best way to handle images in Java

I will develop a Java application that uses some image processing algorithms. I have done some image processing applications using C++. I'm currently using BufferedImage object to save data from images but I'm wondering if there is a better way to handle images in Java (improve performance).
Do you guys have any recommendation?
Thanks!!!
if you want to work with images i would look at JavaCv: https://github.com/bytedeco/javacv
JavaCV first provides wrappers to commonly used libraries by researchers in the field of computer vision: OpenCV, FFmpeg, libdc1394, PGR FlyCapture, OpenKinect, videoInput, and ARToolKitPlus.
I think you will find all what you need.
Luca
For JAVA there exists for example:
FiJi
ImageJ
Fiji
BoofCV
Rapidminer with IMMI (for image mining)

Image processing library for Android and Java

I am currently working on a small project, which shall load an image from an URL, resize and change it's colour depth to only 16 colours using a specified colour palette. The main problem for me is, that I want a program, which I can use on an Android device and on a desktop computer.
Do you know a good image processing library which works on both systems?
Thanks in advance.
There are several tools:
ImageJ, http://rsbweb.nih.gov/ij/
Fiji, http://fiji.sc/wiki/index.php/Fiji
IMMI, http://www.burgsys.com/image-processing-software-free.php
BoofCV: http://boofcv.org
The answers on this page are quite dated as of February 2014. I was searching to find a free Android image processing library and I came across the Stanford lecture notes here: http://www.stanford.edu/class/ee368/Android/index.html
Investigating a bit further, I found out that they are using OpenCV in their course material. It has a Java interface (along with many other languages), but the library is written natively in C++. They state that:
Along with well-established companies like Google, Yahoo, Microsoft,
Intel, IBM, Sony, Honda, Toyota that employ the library, there are
many startups such as Applied Minds, VideoSurf, and Zeitera, that make
extensive use of OpenCV.
I am excited(!) to have found this, looking forward to going home and giving it a go.
The Android NDK allows you to use an existing C/C++ library that does not require java.awt or any of the Android classes. For example, you could easily compile libpng as a shared library for Android and then write a JNI interface to pass images from the Java layer to the png library. Similarly, you will also be able to compile libpng as a shared library for your desktop computer and use it from there.
I recently wrote a tutorial on how to compile open-source libraries for Android. If you browse the Android source, you will find some classes that use the skia graphics library via jni. I have not used skia before, but since Android has skia in its base framework, it should not be too difficult to get it to work in your app/desktop program.
Writing cross-platform programs has been an area of active interest amongst the mobile developers community, and some engines such as libgdx have gotten really good at it. So what you are attempting is definitely possible.
Octoate,
I don't think there is a library that exists that does what you want, the reason for that is on non-mobile platform every graphical operation you are going to use in Java is going to use the Java2D rendering pipeline to some degree. On Android, this doesn't exist.
Android provides its own graphical pipeline for image manipulation and actually simplifies a lot of things that are more complicated in standard Java.
All that being said, it looks like you found a library (JJIL) that acts as an abstraction layer on top of these differences, in that case I would be a bit worried about performance and do some testing in your own code to see how it performs compared to the platform methods. For example, I saw this quote from JJIL:
allows images to be converted from Android bitmaps into JJIL RgbImages
When I look at the source for RgbImages, it looks like the image data gets converted and stored in an internal array; all of those layers of abstraction are going to cost you CPU time and memory, especially as images on mobile devices get bigger due to higher resolution cameras and high-bandwidth connections.
This may not be that big of an issue, but again, you'll probably want to do some profiling/testing/performance comparisons.
Any pure Java library should work on both platforms. A Google search of "Java image processing library" produced several results. Try to find the lightest weight lib that serves your purposes since memory and CPU are limited on mobile devices.
Barry

Is it possible to record video of a Java Swing Component?

I am looking for a way to make a video out of a java JComponent. I found ways to save components as images, but ideally I would like to be able to have the component paint to the screen and to a video file. I am hoping to find a solution that does not require libraries outside of the core JDK, but lightweight libraries might be considered.
Thanks
I don't believe there are libraries that will do what you are asking. Indeed, it seems a rather strange approach. Could you explain what it is that you are trying to achieve.
I suspect that a more viable approach is to use a screen video capture tool like Camtasia to capture what the user is doing. It costs money, but they do have an evaluation download if your boss is a cheapskate.
The core Java JDK doesn't provide a way to write videos, but you can create videos from raw images using the Xuggler open-source project. See this source code for examples of creating a video from raw images that are snapshots of a desktop.
Art

Categories