일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Kinetic
- YoLO
- linetracing
- turtlebot
- ubuntu
- webots
- roslib
- autorace
- turtlebot3
- Gazebo
- sources.list
- gcc
- CuDNN
- error
- RGB-D
- ROS
- rqt
- darknet_ros
- Linux
- 부분공간
- CUDA
- 촉각센서
- ax200
- Installation
- 전이학습
- G++
- FreeCAD
- opencv
- amcl
- roslaunch
- Today
- Total
기술 성공, 실패 기록소
depth compressed encoding:8UC1 을 16UC1으로 변환 본문
distance 값을 얻을 때 16UC1 encoding 된 데이터를 사용해야 하고
이것은 mm단위로 표현되어 있는 듯 하다.
compressed depth image(8UC1)를 16UC1으로 변환 할때
opencv를 사용해서 변환하는 식은 안될거라네 이건
opencv 가 16bit 변환을 지원안한다? 라는 식인듯
그래서
http://wiki.ros.org/compressed_image_transport
compressed_image_transport - ROS Wiki
kinetic melodic noetic Show EOL distros: EOL distros: electric fuerte groovy hydro indigo jade lunar diamondback: Only showing information from the released package extracted on Unknown. No API documentation available. Please see this page for in
wiki.ros.org
패키지를 사용해야 하는데
compressed depth image를 subscribe 해서
compressed depth image를 publish 하는 package인데
format을 변경해주는 parameter가 있다.
여기서 16UC1으로 변경해주면 될 것 같고.
cv_image = bridge.compressed_imgmsg_to_cv2(depth_msg, desired_encoding='16UC1')
위와 같이 변환되어 보내지는 topic을 받아서 cv_image로 변환해서 사용하면
각 pixel 마다 distance 값을 사용 할 수 있을 것으로 예상함.
+jpeg 가 8bit, png가 16bit 일듯하다.
'프로그래밍언어 > ROS' 카테고리의 다른 글
remove package (0) | 2021.08.17 |
---|---|
Writing a Simple Publisher and Subscriber (C++) (0) | 2021.08.13 |
ros package install 규칙 (0) | 2021.08.12 |
rospy subscriber - wait for new data, then read the data (0) | 2021.08.10 |
Convert CompressedImage to Image (0) | 2021.08.07 |