org.cyberlab.local.recognition
Class LocalRecognitionTools

java.lang.Object
  extended by org.cyberlab.local.recognition.LocalRecognitionTools

public class LocalRecognitionTools
extends java.lang.Object

Toolchain for all framework supported recognition as well as other common methods for performing object recognition. related features.

Author:
Mats-Gøran Karlsen

Constructor Summary
LocalRecognitionTools()
           
 
Method Summary
static LocalModel<LICOVModel> createLICOVmodel(Unknown obj1, Unknown obj2)
          Explanation on usage: LICOVrecognitionTools.createLICOVmodel(Unknown, Unknown)
static LocalModel<LICOVModel> createLICOVmodel(Unknown obj1, Unknown obj2, LICOVcreatorOptions opts)
          Explanation on usage: LICOVrecognitionTools.createModel(Unknown, Unknown, LICOVcreatorOptions)
static void knnMatch(double maxDistance, Unknown queryObject, Unknown trainObject, java.util.Map<org.opencv.core.Mat,java.util.Map<java.lang.Integer,java.lang.Integer>> result)
          Helper class to find descriptor matching Map.
static LocalMatch<LICOVMatch> match(LocalObject<LICOVModel> model, Unknown obj)
          Explanation on usage: LICOVrecognitionTools.match(LICOVModel, Unknown)
static LocalMatch<LICOVMatch> match(LocalObject<LICOVModel> model, Unknown obj, LICOVmatcherOptions opts)
          Explanation on usage: LICOVrecognitionTools.match(LICOVModel, Unknown, LICOVmatcherOptions)
static java.util.List<java.util.List<org.opencv.features2d.DMatch>> radiusMatch(float radius, LICOVModel model, Unknown obj)
          The radius matcher in OpenCV yields wrong results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalRecognitionTools

public LocalRecognitionTools()
Method Detail

createLICOVmodel

public static LocalModel<LICOVModel> createLICOVmodel(Unknown obj1,
                                                      Unknown obj2)
                                               throws IncompatibleTypesException
Explanation on usage: LICOVrecognitionTools.createLICOVmodel(Unknown, Unknown)

Throws:
IncompatibleTypesException

createLICOVmodel

public static LocalModel<LICOVModel> createLICOVmodel(Unknown obj1,
                                                      Unknown obj2,
                                                      LICOVcreatorOptions opts)
                                               throws IncompatibleTypesException
Explanation on usage: LICOVrecognitionTools.createModel(Unknown, Unknown, LICOVcreatorOptions)

Throws:
IncompatibleTypesException

match

public static LocalMatch<LICOVMatch> match(LocalObject<LICOVModel> model,
                                           Unknown obj)
                                    throws IncompatibleTypesException
Explanation on usage: LICOVrecognitionTools.match(LICOVModel, Unknown)

Throws:
IncompatibleTypesException

match

public static LocalMatch<LICOVMatch> match(LocalObject<LICOVModel> model,
                                           Unknown obj,
                                           LICOVmatcherOptions opts)
                                    throws IncompatibleTypesException
Explanation on usage: LICOVrecognitionTools.match(LICOVModel, Unknown, LICOVmatcherOptions)

Throws:
IncompatibleTypesException

radiusMatch

public static java.util.List<java.util.List<org.opencv.features2d.DMatch>> radiusMatch(float radius,
                                                                                       LICOVModel model,
                                                                                       Unknown obj)
The radius matcher in OpenCV yields wrong results. This is a working implementation suited for the framework.

Parameters:
radius - The radius of within to match
model - Model to perform the matching on
obj - The Unknown to perform mathing on
Returns:
List of keypoints in the queryDesc order containing a list of all matcher for each keypoint.
See Also:
radiusMatch(float, Mat, Mat)

knnMatch

public static void knnMatch(double maxDistance,
                            Unknown queryObject,
                            Unknown trainObject,
                            java.util.Map<org.opencv.core.Mat,java.util.Map<java.lang.Integer,java.lang.Integer>> result)
Helper class to find descriptor matching Map. List of all pairs that fulfill distance parameter

Parameters:
maxDistance - If best match < (distance*next best match) best match is added to result
queryObject - Unknown object 1 to perform matching on
trainObject - Unknown object 2 to perform matching on
result - Mat is reference to queryDescriptor
See Also:
knnMatch(double, Mat, Mat, Map)