use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestEasyGeneralFeatureDetector method checkExclude.
@Test
public void checkExclude() {
Helper<GrayU8, GrayS16> detector = new Helper<>(true, true);
EasyGeneralFeatureDetector<GrayU8, GrayS16> alg = new EasyGeneralFeatureDetector<>(detector, GrayU8.class, GrayS16.class);
alg.detect(image, new QueueCorner(10));
assertFalse(detector.excludeIsNull);
}
use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestImplEnhanceFilter method sharpenInner4.
public void sharpenInner4(ImageGray input, ImageGray output) {
ImageGray expected;
GImageMiscOps.fillUniform(input, rand, 0, 10);
if (input.getDataType().isInteger()) {
BoofTesting.callStaticMethod(ImplEnhanceFilter.class, "sharpenInner4", input, output, 0, 255);
expected = new GrayS16(input.width, input.height);
ConvolveImageStandard_SB.convolve(ImplEnhanceFilter.kernelEnhance4_I32, (GrayU8) input, (GrayS16) expected);
GPixelMath.boundImage(expected, 0, 255);
} else {
BoofTesting.callStaticMethod(ImplEnhanceFilter.class, "sharpenInner4", input, output, 0f, 255f);
expected = new GrayF32(input.width, input.height);
ConvolveImageStandard_SB.convolve(ImplEnhanceFilter.kernelEnhance4_F32, (GrayF32) input, (GrayF32) expected);
GPixelMath.boundImage(expected, 0, 255);
}
BoofTesting.assertEqualsInner(expected, output, 1e-5, 1, 1, false);
BoofTesting.checkBorderZero(output, 1);
}
use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestImplEnhanceFilter method sharpenInner8.
public void sharpenInner8(ImageGray input, ImageGray output) {
ImageGray expected;
GImageMiscOps.fillUniform(input, rand, 0, 10);
if (input.getDataType().isInteger()) {
BoofTesting.callStaticMethod(ImplEnhanceFilter.class, "sharpenInner8", input, output, 0, 255);
expected = new GrayS16(input.width, input.height);
ConvolveImageStandard_SB.convolve(ImplEnhanceFilter.kernelEnhance8_I32, (GrayU8) input, (GrayS16) expected);
GPixelMath.boundImage(expected, 0, 255);
} else {
BoofTesting.callStaticMethod(ImplEnhanceFilter.class, "sharpenInner8", input, output, 0f, 255f);
expected = new GrayF32(input.width, input.height);
ConvolveImageStandard_SB.convolve(ImplEnhanceFilter.kernelEnhance8_F32, (GrayF32) input, (GrayF32) expected);
GPixelMath.boundImage(expected, 0, 255);
}
BoofTesting.assertEqualsInner(expected, output, 1e-5, 1, 1, false);
BoofTesting.checkBorderZero(output, 1);
}
Aggregations