mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 09:58:32 +00:00
parent
4638b0af7b
commit
ac38679641
|
@ -27,7 +27,7 @@
|
||||||
#define HSV2_WIN "HSV Channel #3 (Blue)"
|
#define HSV2_WIN "HSV Channel #3 (Blue)"
|
||||||
#define HSV3_WIN "HSV Channel #4 (White)"
|
#define HSV3_WIN "HSV Channel #4 (White)"
|
||||||
|
|
||||||
class DebugHSV
|
class DebugHSVFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct xrt_frame_sink base = {};
|
struct xrt_frame_sink base = {};
|
||||||
|
@ -80,7 +80,7 @@ t_debug_hsv_filter_frame3(struct xrt_frame_sink *xsink, struct xrt_frame *xf)
|
||||||
extern "C" void
|
extern "C" void
|
||||||
t_debug_hsv_filter_frame(struct xrt_frame_sink *xsink, struct xrt_frame *xf)
|
t_debug_hsv_filter_frame(struct xrt_frame_sink *xsink, struct xrt_frame *xf)
|
||||||
{
|
{
|
||||||
auto &d = *(class DebugHSV *)xsink;
|
auto &d = *(class DebugHSVFilter *)xsink;
|
||||||
|
|
||||||
d.sink->push_frame(d.sink, xf);
|
d.sink->push_frame(d.sink, xf);
|
||||||
d.passthrough->push_frame(d.passthrough, xf);
|
d.passthrough->push_frame(d.passthrough, xf);
|
||||||
|
@ -93,7 +93,7 @@ t_debug_hsv_filter_break_apart(struct xrt_frame_node *node)
|
||||||
extern "C" void
|
extern "C" void
|
||||||
t_debug_hsv_filter_destroy(struct xrt_frame_node *node)
|
t_debug_hsv_filter_destroy(struct xrt_frame_node *node)
|
||||||
{
|
{
|
||||||
auto d = container_of(node, DebugHSV, node);
|
auto d = container_of(node, DebugHSVFilter, node);
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ t_debug_hsv_filter_create(struct xrt_frame_context *xfctx,
|
||||||
struct xrt_frame_sink *passthrough,
|
struct xrt_frame_sink *passthrough,
|
||||||
struct xrt_frame_sink **out_sink)
|
struct xrt_frame_sink **out_sink)
|
||||||
{
|
{
|
||||||
auto &d = *(new DebugHSV());
|
auto &d = *(new DebugHSVFilter());
|
||||||
|
|
||||||
cv::namedWindow(HSV0_WIN);
|
cv::namedWindow(HSV0_WIN);
|
||||||
cv::namedWindow(HSV1_WIN);
|
cv::namedWindow(HSV1_WIN);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#define HSV_WIN "HSV Filter Tester"
|
#define HSV_WIN "HSV Filter Tester"
|
||||||
|
|
||||||
class DebugHSV
|
class DebugHSVViewer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct xrt_frame_sink base = {};
|
struct xrt_frame_sink base = {};
|
||||||
|
@ -95,7 +95,7 @@ process_pixel(bool f1,
|
||||||
#define NUM_CHAN 4
|
#define NUM_CHAN 4
|
||||||
|
|
||||||
static void
|
static void
|
||||||
process_frame(DebugHSV &d, struct xrt_frame *xf)
|
process_frame(DebugHSVViewer &d, struct xrt_frame *xf)
|
||||||
{
|
{
|
||||||
uint32_t width = SIZE * 3;
|
uint32_t width = SIZE * 3;
|
||||||
uint32_t height = SIZE * NUM_CHAN;
|
uint32_t height = SIZE * NUM_CHAN;
|
||||||
|
@ -150,7 +150,7 @@ process_frame(DebugHSV &d, struct xrt_frame *xf)
|
||||||
extern "C" void
|
extern "C" void
|
||||||
t_debug_hsv_viewer_frame(struct xrt_frame_sink *xsink, struct xrt_frame *xf)
|
t_debug_hsv_viewer_frame(struct xrt_frame_sink *xsink, struct xrt_frame *xf)
|
||||||
{
|
{
|
||||||
auto &d = *(class DebugHSV *)xsink;
|
auto &d = *(class DebugHSVViewer *)xsink;
|
||||||
|
|
||||||
process_frame(d, xf);
|
process_frame(d, xf);
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ t_debug_hsv_viewer_break_apart(struct xrt_frame_node *node)
|
||||||
extern "C" void
|
extern "C" void
|
||||||
t_debug_hsv_viewer_destroy(struct xrt_frame_node *node)
|
t_debug_hsv_viewer_destroy(struct xrt_frame_node *node)
|
||||||
{
|
{
|
||||||
auto d = container_of(node, DebugHSV, node);
|
auto d = container_of(node, DebugHSVViewer, node);
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ t_debug_hsv_viewer_create(struct xrt_frame_context *xfctx,
|
||||||
struct xrt_frame_sink *passthrough,
|
struct xrt_frame_sink *passthrough,
|
||||||
struct xrt_frame_sink **out_sink)
|
struct xrt_frame_sink **out_sink)
|
||||||
{
|
{
|
||||||
auto &d = *(new DebugHSV());
|
auto &d = *(new DebugHSVViewer());
|
||||||
|
|
||||||
cv::namedWindow(HSV_WIN);
|
cv::namedWindow(HSV_WIN);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue