Codota Logo
UtilGaussian.computePDF
Code IndexAdd Codota to your IDE (free)

How to use
computePDF
method
in
org.ddogleg.stats.UtilGaussian

Best Java code snippets using org.ddogleg.stats.UtilGaussian.computePDF (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.boofcv/recognition

/**
 * compute the weights by convolving 1D gaussian kernel
 */
protected void computeWeights(int numSamples, double numSigmas) {
  weights = new float[ numSamples*numSamples ];
  float w[] = new float[ numSamples ];
  for( int i = 0; i < numSamples; i++ ) {
    float x = i/(float)(numSamples-1);
    w[i] = (float) UtilGaussian.computePDF(0, 1, 2f*numSigmas * (x - 0.5f));
  }
  for( int y = 0; y < numSamples; y++ ) {
    for( int x = 0; x < numSamples; x++ ) {
      weights[y*numSamples + x] = w[y]*w[x];
    }
  }
}
origin: org.boofcv/feature

for (int row = 0; row < rows; row++) {
  double drow = row-radiusRow+offsetRow;
  double pdfRow = UtilGaussian.computePDF(0, radiusRow, drow);
    double pdfCol = UtilGaussian.computePDF(0, radiusCol, dcol);
origin: org.boofcv/boofcv-ip

protected static Kernel1D_F64 gaussian1D_F64(double sigma, int radius, boolean odd, boolean normalize) {
  Kernel1D_F64 ret;
  if( odd ) {
    ret = new Kernel1D_F64(radius * 2 + 1);
    int index = 0;
    for (int i = radius; i >= -radius; i--) {
      ret.data[index++] = UtilGaussian.computePDF(0, sigma, i);
    }
  } else {
    ret = new Kernel1D_F64(radius * 2);
    int index = 0;
    for (int i = radius; i > -radius; i--) {
      ret.data[index++] = UtilGaussian.computePDF(0, sigma, i-0.5);
    }
  }
  if (normalize) {
    KernelMath.normalizeSumToOne(ret);
  }
  return ret;
}
origin: org.boofcv/boofcv-ip

/**
 * <p>
 * Creates a floating point Gaussian kernel with the sigma and radius.
 * If normalized is set to true then the elements in the kernel will sum up to one.
 * </p>
 * @param sigma     Distributions standard deviation.
 * @param radius    Kernel's radius.
 * @param odd Does the kernel have an even or add width
 * @param normalize If the kernel should be normalized to one or not.
 */
protected static Kernel1D_F32 gaussian1D_F32(double sigma, int radius, boolean odd, boolean normalize) {
  Kernel1D_F32 ret;
  if( odd ) {
    ret = new Kernel1D_F32(radius * 2 + 1);
    int index = 0;
    for (int i = radius; i >= -radius; i--) {
      ret.data[index++] = (float) UtilGaussian.computePDF(0, sigma, i);
    }
  } else {
    ret = new Kernel1D_F32(radius * 2);
    int index = 0;
    for (int i = radius; i > -radius; i--) {
      ret.data[index++] = (float) UtilGaussian.computePDF(0, sigma, i-0.5);
    }
  }
  if (normalize) {
    KernelMath.normalizeSumToOne(ret);
  }
  return ret;
}
origin: lessthanoptimal/ddogleg

/**
 * Test the PDF based on some of its properties
 */
@Test
public void computePDF() {
  double max = UtilGaussian.computePDF(2,1.5,2);
  assertTrue( UtilGaussian.computePDF(2,1.5,1) < max );
  assertTrue( UtilGaussian.computePDF(2,1.5,3) < max );
  assertEquals(UtilGaussian.computePDF(2, 1.5, 1),UtilGaussian.computePDF(2, 1.5, 3),1e-8 );
  assertTrue( UtilGaussian.computePDF(2,2,2) < max );
  assertTrue( UtilGaussian.computePDF(2,1,2) > max );
}
origin: org.boofcv/boofcv-ip

double dx = x <= r ? Math.abs(x-r)+0.5 : Math.abs(x-r-1)+0.5;
double d = Math.sqrt(dx*dx + dy*dy);
double val = UtilGaussian.computePDF(0,sigma,d);
ret.set(x,y,val);
sum += val;
origin: org.boofcv/boofcv-ip

double sum = 0;
for (int i = radius; i >= -radius; i--) {
  sum += UtilGaussian.computePDF(0, sigma, i);
org.ddogleg.statsUtilGaussiancomputePDF

Popular methods of UtilGaussian

  • derivative1
  • derivative2
  • derivative3
  • derivative4

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JFileChooser (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now