bpp = Integer.parseInt(get(prop, "video.bpp", "2"));
switch (get(prop, "video.format", "").toUpperCase()) {
case "YUYV":
- format = Imgproc.COLOR_YUV2RGB_YUYV;
+ format = Imgproc.COLOR_YUV2BGR_YUYV;
break;
case "YVYU":
- format = Imgproc.COLOR_YUV2RGB_YVYU;
+ format = Imgproc.COLOR_YUV2BGR_YVYU;
break;
default:
- format = Imgproc.COLOR_YUV2RGB_UYVY;
+ format = Imgproc.COLOR_YUV2BGR_UYVY;
}
crop = new CropConfiguration(prop);
}
}
/**
- * Creates a LED frame going clockwise from the bottom-left corner, sans the corners.
+ * Creates a LED frame going counter-clockwise from the bottom-left corner, sans the corners.
*/
public LedFrame getLedFrame() {
LedFrame frame = LedFrame.from(config);
int led = 0;
- for (int i = config.leds.rows - 1; i >= 0; i--) frame.setLedColor(led++, getLedColor(ListPosition.LEFT, i));
- for (int i = 0; i < config.leds.cols; i++) frame.setLedColor(led++, getLedColor(ListPosition.TOP, i));
- for (int i = 0; i < config.leds.rows; i++) frame.setLedColor(led++, getLedColor(ListPosition.RIGHT, i));
- for (int i = config.leds.cols - 1; i >= 0; i--) frame.setLedColor(led++, getLedColor(ListPosition.BOTTOM, i));
+ for (int i = 0; i < config.leds.cols; i++) frame.setLedColor(led++, getLedColor(ListPosition.BOTTOM, i));
+ for (int i = config.leds.rows - 1; i >= 0; i--) frame.setLedColor(led++, getLedColor(ListPosition.RIGHT, i));
+ for (int i = config.leds.cols - 1; i >= 0; i--) frame.setLedColor(led++, getLedColor(ListPosition.TOP, i));
+ for (int i = 0; i < config.leds.rows; i++) frame.setLedColor(led++, getLedColor(ListPosition.LEFT, i));
return frame;
}
}