stereodisk
Class StereoDiskIxConverter

java.lang.Object
  |
  +--stereodisk.StereoDiskAnalyzer
        |
        +--stereodisk.StereoDiskIxConverter

public class StereoDiskIxConverter
extends StereoDiskAnalyzer

Stereo disk photograph analysis. Converts features and ground truth to IX (ISI) format. Selects a balanced random subset of all pixels, so that every class has a comparable number of pixels. Copyright (c) 1999-2004, Michael Abramoff. All rights reserved.


Field Summary
protected static int PIXEL_SAMPLING
           
 
Fields inherited from class stereodisk.StereoDiskAnalyzer
height, testing, training, width
 
Constructor Summary
StereoDiskIxConverter()
           
 
Method Summary
protected static int[] createSampleBlock(float[] groundtruth, int n)
          Kreeer een block van n x,y coordinaten waarmee de kans zo hoog mogelijk is om 1:1:1 van de 3 classificaties te vangen.
protected static int[][] createSampleBlocks(float[][] groundtruths, int n)
          Create as many blocks of balanced pixel indices as there are images in images.
static void main(java.lang.String[] args)
           
protected static int min(int[] v)
           
protected static float[][] subset(float[][] set, int[][] indices)
          Smart sampler.
 
Methods inherited from class stereodisk.StereoDiskAnalyzer
analyzeProbabilities, buildString, createBalancedSampleBlock, createBalancedSampleBlocks, imageFeaturePixels, loadFeatures, loadFloatImage, loadFloatImages, pixelsToDataset, plotProbs, sampleEvenImages, sampleFeatureImagePixels, sampleFeatureImagePixels, sampleImages, sampleOddImages, showAccuracies, subsample, subsample, subset, testKNN, trainKNN
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PIXEL_SAMPLING

protected static final int PIXEL_SAMPLING
Constructor Detail

StereoDiskIxConverter

public StereoDiskIxConverter()
Method Detail

main

public static void main(java.lang.String[] args)

subset

protected static float[][] subset(float[][] set,
                                  int[][] indices)
Smart sampler. About 200000 pixels are class 0, 50000 class 1 and 25000 class 2. Als most 0 are at the edges. Still you want the same numbers of feature vectors for each class. For 50 images of 250000 pixels each, you have 12.5 million pixels. Als je er 12500 van wil hebben is dat 1:1000 pixels. Dus per plaatje 250 pixels van ieder. Je kan ook een random block creeeren die voor een plaatje 1:1:1 aantallen pixels samplet, en dan dat gebruiken voor allemaal.
Returns:
the subsampled set.

createSampleBlock

protected static int[] createSampleBlock(float[] groundtruth,
                                         int n)
Kreeer een block van n x,y coordinaten waarmee de kans zo hoog mogelijk is om 1:1:1 van de 3 classificaties te vangen. About 200000 pixels are class 0, 50000 class 1 and 25000 class 2. Als most 0 are at the edges. Still you want the same numbers of feature vectors for each class. For 50 images of 250000 pixels each, you have 12.5 million pixels. Als je er 12500 van wil hebben is dat 1:1000 pixels. Dus per plaatje 250 pixels van ieder. Je kan ook een random block creeeren die voor een plaatje 1:1:1 aantallen pixels samplet, en dan dat gebruiken voor allemaal.
Returns:
the x,y coordinates

createSampleBlocks

protected static int[][] createSampleBlocks(float[][] groundtruths,
                                            int n)
Create as many blocks of balanced pixel indices as there are images in images. You want the same numbers of feature vectors for each class. For 50 images of 250000 pixels each, you have 12.5 million pixels. Als je er 12500 van wil hebben is dat 1:1000 pixels. Dus per plaatje 250 pixels van ieder.
Parameters:
groundtruth - the array of images containing the correct classes for each pixels.
Returns:
the x,y coordinates

min

protected static int min(int[] v)