From 1e13e816d10b84b5f6ddd3ad1fa41e721f3d610e Mon Sep 17 00:00:00 2001 From: gbr1 Date: Tue, 27 Sep 2022 14:36:12 +0000 Subject: [PATCH 1/4] added init.py in submodules --- .../image_classification.cpython-38.pyc | Bin 6264 -> 6266 bytes edgeimpulse_ros/submodules/__init__.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 edgeimpulse_ros/submodules/__init__.py diff --git a/edgeimpulse_ros/__pycache__/image_classification.cpython-38.pyc b/edgeimpulse_ros/__pycache__/image_classification.cpython-38.pyc index 59650d87ab5902a5887a566e83bd9c20cf129cba..0a2dc64c399268ed7649c80d426e734b3bcc22ae 100644 GIT binary patch delta 41 wcmexi@XLTVl$V!_0SI306-oZHk#{pQGqZyJ DgPjkA diff --git a/edgeimpulse_ros/submodules/__init__.py b/edgeimpulse_ros/submodules/__init__.py new file mode 100644 index 0000000..e69de29 From 70587d7b118f30a33ff97709090ca571344efcd4 Mon Sep 17 00:00:00 2001 From: gbr1 Date: Tue, 27 Sep 2022 14:39:38 +0000 Subject: [PATCH 2/4] _ over - in setup.cfg --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 096ae52..e5f07ff 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,4 +1,4 @@ [develop] -script-dir=$base/lib/edgeimpulse_ros +script_dir=$base/lib/edgeimpulse_ros [install] -install-scripts=$base/lib/edgeimpulse_ros +install_scripts=$base/lib/edgeimpulse_ros From c8f0d97975efdc7e9c9507db0d75edcb5421fa5b Mon Sep 17 00:00:00 2001 From: gbr1 Date: Tue, 27 Sep 2022 21:43:57 +0000 Subject: [PATCH 3/4] fix rgb8 and bgr8 input --- .../image_classification.cpython-38.pyc | Bin 6266 -> 6311 bytes edgeimpulse_ros/image_classification.py | 4 +++- .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 169 bytes 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 edgeimpulse_ros/submodules/__pycache__/__init__.cpython-38.pyc diff --git a/edgeimpulse_ros/__pycache__/image_classification.cpython-38.pyc b/edgeimpulse_ros/__pycache__/image_classification.cpython-38.pyc index 0a2dc64c399268ed7649c80d426e734b3bcc22ae..196ed8ff2c054e6a5f38b2769b41ab9892cbf4fe 100644 GIT binary patch delta 526 zcmexmu-uR@l$V!_0SHdz8YlZIZ{(ZJnZW|&g0M3X7yAH-5{4SaEXHQWB99t|ET#p_ zHH-@xYngyzEVaxv%qfi7OhrZ|tP9v`m`Yf)*cUPZoL6Ia2eI^HVbO(kIJsnQE{U=>hG##hhE59>tqnT2z#p zR}!CAl$e_u#gmzv9uHTX%_Yez094Ar$i>LR$i~RAxtGh1g|)~QC^Y#Z-%K_SAfw20 zasj^!qvPbQ{Pv7alfUw}u(^SRgC^Gtcrq4mJ}HpJ#27HyL|6+*#tSPlhEHx3mSv2c zJYQIxarfly!VNqt8T~Ywief;z5+?g`icgLa;bgopIZb2>W6We}QCT}bkW?&)hzAmy ztY8lmiGu_pK|~aYhz1dcaKZ@00%^Q5xlA-&ISIx^QUX>CRwoOT-8D%}j5`^mECocQ zPF56)X5^b(D;C6`2o%s{yTw|RoKsL)6gT;vn6v0Zpja_DRv9^fVZ+75!B~_r*-YGp c%@L$MeR6~N0=5hgGkLO_gg>hV2L}fu02su13jhEB delta 484 zcmZ2(_{)GVl$V!_0SI306-oZ1w2^N%X9zQp%L2sCKwNAGBuW@+7_%6g8H=oH7_yia zFxN0HWUOT>VOhXh10=K97BbZ`0cF^Wt!jXDJO_}?xqxdS10zEULomZiMn6sN$%0%8 zldZW-7?~#*a7ii^83K)k5Jn)D4vcTRpL+`w043)G;=R1^);7eCpLQ=ID-dwhIKYEFFoxyh47wlGFd_7Ih| z^99MrfQUGd2G$}y5L+BXM1Y7$5D^6;(0l^Ycxm!t(R8*1kgV@y0Wle+9YAI=8<5~& z3NB{r; diff --git a/edgeimpulse_ros/image_classification.py b/edgeimpulse_ros/image_classification.py index 424103c..a03a932 100644 --- a/edgeimpulse_ros/image_classification.py +++ b/edgeimpulse_ros/image_classification.py @@ -101,7 +101,9 @@ def parameters_callback(self): def listener_callback(self, msg): if len(msg.data): current_frame = self.cv_bridge.imgmsg_to_cv2(msg) - current_frame = cv2.cvtColor(current_frame, cv2.COLOR_BGR2RGB) + img_encoding = msg.encoding + if img_encoding=="bgr8": + current_frame = cv2.cvtColor(current_frame, cv2.COLOR_BGR2RGB) if not self.occupied: self.img = current_frame self.timer_classify.reset() diff --git a/edgeimpulse_ros/submodules/__pycache__/__init__.cpython-38.pyc b/edgeimpulse_ros/submodules/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3c7190bae14611d7f7e87179e7ff965f334a9707 GIT binary patch literal 169 zcmWIL<>g`k0%tDcWDxxrL?8o3AjbiSi&=m~3PUi1CZpdB#S{7ekte;exnUkWQnv$NHnOjhrQ=A%KlwXX&FD^~W%}*)KNiEiokI&4@EQycT SE2zB1VFMAh1KIN#h#3IC`6`3} literal 0 HcmV?d00001 From 92e398730ff2b92edec739f5ba88cbd9cd832c3d Mon Sep 17 00:00:00 2001 From: gbr1 Date: Tue, 27 Sep 2022 21:53:50 +0000 Subject: [PATCH 4/4] tagging prerelease 0.0.3 --- package.xml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.xml b/package.xml index 79ae856..54aa6bc 100644 --- a/package.xml +++ b/package.xml @@ -2,7 +2,7 @@ edgeimpulse_ros - 0.0.1 + 0.0.3 ROS2 wrapper for Edge Impulse gbr1 Apache 2.0 diff --git a/setup.py b/setup.py index 4d5aa3d..12b26bc 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ submodules = 'edgeimpulse_ros/submodules' setup( name=package_name, - version='0.0.2', + version='0.0.3', packages=[package_name, submodules], data_files=[ ('share/ament_index/resource_index/packages',