mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
20
wpiutil/src/main/native/include/wpi/util/PixelFormat.h
Normal file
20
wpiutil/src/main/native/include/wpi/util/PixelFormat.h
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Pixel formats
|
||||
*/
|
||||
enum WPI_PixelFormat {
|
||||
WPI_PIXFMT_UNKNOWN = 0, // unknown
|
||||
WPI_PIXFMT_MJPEG, // Motion-JPEG (compressed image data)
|
||||
WPI_PIXFMT_YUYV, // YUV 4:2:2, 16 bpp
|
||||
WPI_PIXFMT_RGB565, // RGB 5-6-5, 16 bpp
|
||||
WPI_PIXFMT_BGR, // BGR 8-8-8, 24 bpp
|
||||
WPI_PIXFMT_GRAY, // Grayscale, 8 bpp
|
||||
WPI_PIXFMT_Y16, // Grayscale, 16 bpp
|
||||
WPI_PIXFMT_UYVY, // YUV 4:2:2, 16 bpp
|
||||
WPI_PIXFMT_BGRA, // BGRA 8-8-8-8-, 32 bpp
|
||||
};
|
||||
26
wpiutil/src/main/native/include/wpi/util/PixelFormat.hpp
Normal file
26
wpiutil/src/main/native/include/wpi/util/PixelFormat.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "wpi/util/PixelFormat.h"
|
||||
|
||||
namespace wpi::util {
|
||||
|
||||
/**
|
||||
* Pixel formats
|
||||
*/
|
||||
enum class PixelFormat {
|
||||
kUnknown = WPI_PIXFMT_UNKNOWN,
|
||||
kMJPEG = WPI_PIXFMT_MJPEG,
|
||||
kYUYV = WPI_PIXFMT_YUYV,
|
||||
kRGB565 = WPI_PIXFMT_RGB565,
|
||||
kBGR = WPI_PIXFMT_BGR,
|
||||
kGray = WPI_PIXFMT_GRAY,
|
||||
kY16 = WPI_PIXFMT_Y16,
|
||||
kUYVY = WPI_PIXFMT_UYVY,
|
||||
kBGRA = WPI_PIXFMT_BGRA,
|
||||
};
|
||||
|
||||
} // namespace wpi::util
|
||||
@@ -30,21 +30,6 @@ typedef struct WPI_RawFrame { // NOLINT
|
||||
int timestampSrc; // WPI_TimestampSource
|
||||
} WPI_RawFrame;
|
||||
|
||||
/**
|
||||
* Pixel formats
|
||||
*/
|
||||
enum WPI_PixelFormat {
|
||||
WPI_PIXFMT_UNKNOWN = 0, // unknown
|
||||
WPI_PIXFMT_MJPEG, // Motion-JPEG (compressed image data)
|
||||
WPI_PIXFMT_YUYV, // YUV 4:2:2, 16 bpp
|
||||
WPI_PIXFMT_RGB565, // RGB 5-6-5, 16 bpp
|
||||
WPI_PIXFMT_BGR, // BGR 8-8-8, 24 bpp
|
||||
WPI_PIXFMT_GRAY, // Grayscale, 8 bpp
|
||||
WPI_PIXFMT_Y16, // Grayscale, 16 bpp
|
||||
WPI_PIXFMT_UYVY, // YUV 4:2:2, 16 bpp
|
||||
WPI_PIXFMT_BGRA, // BGRA 8-8-8-8-, 32 bpp
|
||||
};
|
||||
|
||||
/**
|
||||
* Timestamp metadata. Timebase is the same as wpi::util::Now
|
||||
*/
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "wpi/util/PixelFormat.h"
|
||||
#include "wpi/util/RawFrame.h"
|
||||
|
||||
#ifdef WPI_RAWFRAME_JNI
|
||||
|
||||
@@ -71,6 +71,7 @@ Color = "wpi/util/Color.hpp"
|
||||
Color8Bit = "wpi/util/Color8Bit.hpp"
|
||||
StackTrace = "wpi/util/StackTrace.hpp"
|
||||
Synchronization = "wpi/util/Synchronization.hpp"
|
||||
PixelFormat = "wpi/util/PixelFormat.hpp"
|
||||
RawFrame_c = "wpi/util/RawFrame.h"
|
||||
RawFrame = "wpi/util/RawFrame.hpp"
|
||||
|
||||
|
||||
2
wpiutil/src/main/python/semiwrap/PixelFormat.yml
Normal file
2
wpiutil/src/main/python/semiwrap/PixelFormat.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
enums:
|
||||
PixelFormat:
|
||||
Reference in New Issue
Block a user