use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class FactoryDescribeImageDense method hog.
/**
* Creates a dense HOG descriptor.
*
* @see DescribeDenseHogFastAlg
* @see DescribeDenseHogAlg
*
* @param config Configuration for HOG descriptor. Can't be null.
* @param imageType Type of input image. Can be single band or planar
* @return Dense HOG extractor
*/
public static <T extends ImageBase<T>> DescribeImageDense<T, TupleDesc_F64> hog(@Nullable ConfigDenseHoG config, ImageType<T> imageType) {
if (config == null)
config = new ConfigDenseHoG();
config.checkValidity();
ImageType actualType;
if (imageType.getDataType() != ImageDataType.F32) {
actualType = new ImageType(imageType.getFamily(), ImageDataType.F32, imageType.getNumBands());
} else {
actualType = imageType;
}
BaseDenseHog hog;
if (config.fastVariant) {
hog = FactoryDescribeImageDenseAlg.hogFast(config, actualType);
} else {
hog = FactoryDescribeImageDenseAlg.hog(config, actualType);
}
DescribeImageDenseHoG output = new DescribeImageDenseHoG(hog);
// If the data type isn't F32 convert it into that data type first
if (actualType != imageType) {
return new DescribeImageDense_Convert<>(output, imageType);
} else {
return output;
}
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class TestClipAndReduce method massage_scaled.
@Test
public void massage_scaled() {
for (ImageType type : types) {
massage_written_to(false, type);
massage_distorted(false, type);
}
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class TestClipAndReduce method massage_clipped.
@Test
public void massage_clipped() {
for (ImageType type : types) {
massage_written_to(true, type);
massage_distorted(true, type);
}
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class TestClipAndReduce method clipInput.
@Test
public void clipInput() {
for (ImageType type : types) {
clipInput(type, 30, 40, 50, 30);
clipInput(type, 50, 30, 30, 40);
}
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class DemonstrationInterpolateScaleApp method main.
public static void main(String[] args) {
ImageType type = ImageType.pl(3, GrayF32.class);
// ImageType type = ImageType.pl(3,GrayU8.class);
// ImageType type = ImageType.single(GrayU8.class);
// ImageType type = ImageType.il(3, InterleavedF32.class);
List<String> examples = new ArrayList<>();
examples.add(UtilIO.pathExample("eye01.jpg"));
examples.add(UtilIO.pathExample("small_sunflower.jpg"));
DemonstrationInterpolateScaleApp app = new DemonstrationInterpolateScaleApp(examples, type);
app.setPreferredSize(new Dimension(500, 500));
app.openFile(new File(examples.get(0)));
app.display("Interpolation Enlarge");
}
Aggregations