From 75db0fc5844f95d7c5503dd735e7d5b5621261b3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 18 Aug 2021 13:50:31 +0200 Subject: video/ps3eye: switch to grayscale --- video-ps3eye/module.cpp | 2 +- video-ps3eye/shm-layout.hpp | 4 ++-- video-ps3eye/wrapper.cxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'video-ps3eye') diff --git a/video-ps3eye/module.cpp b/video-ps3eye/module.cpp index d135047c..34987241 100644 --- a/video-ps3eye/module.cpp +++ b/video-ps3eye/module.cpp @@ -157,7 +157,7 @@ bool ps3eye_camera::start(info& args) open = false; fr = {}; - fr.channels = 3; + fr.channels = 1; fr.channel_size = 1; if (!args.width || args.width > 320) diff --git a/video-ps3eye/shm-layout.hpp b/video-ps3eye/shm-layout.hpp index 577021b9..3ae406c5 100644 --- a/video-ps3eye/shm-layout.hpp +++ b/video-ps3eye/shm-layout.hpp @@ -23,8 +23,8 @@ struct shm_out status status_; char error_string[256]; union { - uint8_t data_320x240[320][240][3]; - uint8_t data_640x480[640][480][3]; + uint8_t data_320x240[320][240][1]; + uint8_t data_640x480[640][480][1]; }; }; diff --git a/video-ps3eye/wrapper.cxx b/video-ps3eye/wrapper.cxx index e5730a7a..2ebdc2e1 100644 --- a/video-ps3eye/wrapper.cxx +++ b/video-ps3eye/wrapper.cxx @@ -70,7 +70,7 @@ int main(int argc, char** argv) if (framerate <= 0) framerate = 60; - if (!camera->init(get_mode(in.resolution), framerate)) + if (!camera->init(get_mode(in.resolution), framerate, ps3eye::format::Gray)) error(out, "camera init failed: %s", camera->error_string()); update_settings(*camera, in); @@ -94,7 +94,7 @@ int main(int argc, char** argv) int framerate = in.framerate; if (framerate <= 0) framerate = 60; - if (!camera->init(get_mode(in.resolution), framerate)) + if (!camera->init(get_mode(in.resolution), framerate, ps3eye::format::Gray)) error(out, "camera init failed: %s", camera->error_string()); if (!camera->start()) error(out, "can't start camera: %s", camera->error_string()); -- cgit v1.2.3