summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-08-18 13:50:31 +0200
committerStanislaw Halik <sthalik@misaki.pl>2021-08-18 13:53:47 +0200
commit75db0fc5844f95d7c5503dd735e7d5b5621261b3 (patch)
tree48cf1ba64c71fe71f4175fa3a0949d2e38b18259
parentd6907613e89b906edb3f2b7c0049f8b13f3524ee (diff)
video/ps3eye: switch to grayscale
-rw-r--r--video-ps3eye/module.cpp2
-rw-r--r--video-ps3eye/shm-layout.hpp4
-rw-r--r--video-ps3eye/wrapper.cxx4
3 files changed, 5 insertions, 5 deletions
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());