Tabnine Logo
UtilFeature.normalizeL2
Code IndexAdd Tabnine to your IDE (free)

How to use
normalizeL2
method
in
boofcv.alg.descriptor.UtilFeature

Best Java code snippets using boofcv.alg.descriptor.UtilFeature.normalizeL2 (Showing top 3 results out of 315)

origin: org.boofcv/feature

/**
 * Adjusts the descriptor.  This adds lighting invariance and reduces the affects of none-affine changes
 * in lighting.
 *
 * 1) Apply L2 normalization
 * 2) Clip using max descriptor value
 * 3) Apply L2 normalization again
 */
public static void normalizeDescriptor(TupleDesc_F64 descriptor , double maxDescriptorElementValue ) {
  // normalize descriptor to unit length
  UtilFeature.normalizeL2(descriptor);
  // clip the values
  for (int i = 0; i < descriptor.size(); i++) {
    double value = descriptor.value[i];
    if( value > maxDescriptorElementValue ) {
      descriptor.value[i] = maxDescriptorElementValue;
    }
  }
  // normalize again
  UtilFeature.normalizeL2(descriptor);
}
origin: org.boofcv/feature

/**
 * <p>
 * Computes the SURF descriptor for the specified interest point.  If the feature
 * goes outside of the image border (including convolution kernels) then null is returned.
 * </p>
 *
 * @param x Location of interest point.
 * @param y Location of interest point.
 * @param angle The angle the feature is pointing at in radians.
 * @param scale Scale of the interest point. Null is returned if the feature goes outside the image border.
 * @param ret storage for the feature. Must have 64 values.
 */
public void describe(double x, double y, double angle, double scale, BrightFeature ret)
{
  describe(x, y, angle, scale, (TupleDesc_F64) ret);
  // normalize feature vector to have an Euclidean length of 1
  // adds light invariance
  UtilFeature.normalizeL2(ret);
  // Laplacian's sign
  ret.white = computeLaplaceSign((int)(x+0.5),(int)(y+0.5), scale);
}
origin: org.boofcv/feature

public void describe(double x, double y, double angle, double scale, BrightFeature desc)
{
  int featureIndex = 0;
  for( int band = 0; band < ii.getNumBands(); band++ ) {
    describe.setImage(ii.getBand(band));
    describe.describe(x,y, angle, scale, bandDesc);
    System.arraycopy(bandDesc.value,0,desc.value,featureIndex,bandDesc.size());
    featureIndex += bandDesc.size();
  }
  UtilFeature.normalizeL2(desc);
  describe.setImage(grayII);
  desc.white = describe.computeLaplaceSign((int)(x+0.5),(int)(y+0.5),scale);
}
boofcv.alg.descriptorUtilFeaturenormalizeL2

Javadoc

Normalized the tuple such that the L2-norm is equal to 1. This is also often referred to as the Euclidean or frobenius (all though that's a matrix norm).

value[i] = value[i]/sqrt(sum(value[j]*value[j], for all j))

Popular methods of UtilFeature

  • createQueue
    Creates a FastQueue and declares new instances of the descriptor using the provided DetectDescribePo

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • getApplicationContext (Context)
  • getSystemService (Context)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Permission (java.security)
    Legacy security code; do not use.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now