+ switch (get(prop, "video.format", "").toUpperCase()) {
+ case "YUYV":
+ format = Imgproc.COLOR_YUV2BGR_YUYV;
+ break;
+ case "YVYU":
+ format = Imgproc.COLOR_YUV2BGR_YVYU;
+ break;
+ default:
+ format = Imgproc.COLOR_YUV2BGR_UYVY;
+ }
+ crop = new CropConfiguration(prop);
+ }
+
+ public class CropConfiguration {
+ public int left, right, top, bottom;
+
+ private CropConfiguration(Properties prop) {
+ left = Integer.parseInt(get(prop, "video.crop.left", "0"));
+ right = Integer.parseInt(get(prop, "video.crop.right", "0"));
+ top = Integer.parseInt(get(prop, "video.crop.top", "0"));
+ bottom = Integer.parseInt(get(prop, "video.crop.bottom", "0"));
+ }