use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class GenericBackgroundMovingGaussianChecks method performStationaryTests.
@Test
public void performStationaryTests() {
GenericBackgroundStationaryGaussianChecks stationary = new GenericBackgroundStationaryGaussianChecks() {
@Override
public BackgroundModelStationary create(ImageType imageType) {
BackgroundModelMoving moving = GenericBackgroundMovingGaussianChecks.this.create(imageType);
return new MovingToStationary((BackgroundMovingGaussian) moving, new Homography2D_F32());
}
};
stationary.initialVariance();
stationary.minimumDifference();
stationary.learnRate();
stationary.checkBandsUsed();
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class TestBlurStorageFilter method median.
@Test
public void median() {
for (ImageType c : imageTypes) {
ImageBase input = c.createImage(width, height);
ImageBase found = c.createImage(width, height);
ImageBase expected = c.createImage(width, height);
GImageMiscOps.fillUniform(input, rand, 0, 100);
BlurStorageFilter alg = new BlurStorageFilter<>("median", c, 2);
GBlurImageOps.median(input, found, 2);
alg.process(input, expected);
BoofTesting.assertEquals(expected, found, 1e-4);
}
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class TestBlurStorageFilter method mean.
@Test
public void mean() {
for (ImageType c : imageTypes) {
ImageBase input = c.createImage(width, height);
ImageBase found = c.createImage(width, height);
ImageBase expected = c.createImage(width, height);
ImageBase storage = c.createImage(width, height);
GImageMiscOps.fillUniform(input, rand, 0, 100);
BlurStorageFilter alg = new BlurStorageFilter<>("mean", c, 2);
GBlurImageOps.mean(input, found, 2, storage);
alg.process(input, expected);
BoofTesting.assertEquals(expected, found, 1e-4);
}
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class TestBlurStorageFilter method gaussian.
@Test
public void gaussian() {
for (ImageType c : imageTypes) {
ImageBase input = c.createImage(width, height);
ImageBase found = c.createImage(width, height);
ImageBase expected = c.createImage(width, height);
ImageBase storage = c.createImage(width, height);
GImageMiscOps.fillUniform(input, rand, 0, 100);
BlurStorageFilter alg = new BlurStorageFilter<>("gaussian", c, -1, 2);
GBlurImageOps.gaussian(input, found, -1, 2, storage);
alg.process(input, expected);
BoofTesting.assertEquals(expected, found, 1e-4);
}
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class GenericFiducialDetectorChecks method modifyInput.
/**
* Makes sure the input is not modified
*/
@Test
public void modifyInput() {
for (ImageType type : types) {
ImageBase image = loadImage(type);
ImageBase orig = image.clone();
FiducialDetector detector = createDetector(type);
detector.setLensDistortion(loadDistortion(true), image.width, image.height);
detector.detect(image);
BoofTesting.assertEquals(image, orig, 0);
}
}
Aggregations