# \#ros

**URL:** https://forum.opencv.org/tag/ros/261.md

[Latest](https://forum.opencv.org/latest.md) · [Categories](https://forum.opencv.org/categories.md) · [Tags](https://forum.opencv.org/tags.md)

---

## [SfM + Wheeld Robot's Odometry: scene resonstruction issues](https://forum.opencv.org/t/sfm-wheeld-robots-odometry-scene-resonstruction-issues/24165)

<div class="topic-metadata">

**Author:** [@eyecaster](https://forum.opencv.org/u/eyecaster)\
**Replies:** 0\
**Last updated:** [October 28, 2025, 7:49pm UTC](https://forum.opencv.org/t/sfm-wheeld-robots-odometry-scene-resonstruction-issues/24165 "2025-10-28T19:49:47Z")

</div>

Hello. My goal is to have perform structure from motion via a wheeled robot equipped with a monocular camera. For now, the robot’s simulated in IsaacSim, the image, camera info, as well as odometry are sent through ROS…

---

## [Create a one-channel cv::mat object from 2d cv::mat object](https://forum.opencv.org/t/create-a-one-channel-cv-mat-object-from-2d-cv-mat-object/19851)

<div class="topic-metadata">

**Author:** [@UnlimitedR](https://forum.opencv.org/u/UnlimitedR)\
**Replies:** 2\
**Last updated:** [January 24, 2025, 8:56am UTC](https://forum.opencv.org/t/create-a-one-channel-cv-mat-object-from-2d-cv-mat-object/19851 "2025-01-24T08:56:59Z")

</div>

const cv::Mat depth\_img = cv\_bridge::toCvCopy(msg-\>depth\_image, sensor\_msgs::image\_encodings::TYPE\_16UC1) -\>image; cv::Mat dep(depth\_img.rows, depth\_img.cols, CV\_32…

---

## [Cv\_camera package](https://forum.opencv.org/t/cv-camera-package/16617)

<div class="topic-metadata">

**Author:** [@pitosalas](https://forum.opencv.org/u/pitosalas)\
**Replies:** 0\
**Last updated:** [February 27, 2024, 1:03am UTC](https://forum.opencv.org/t/cv-camera-package/16617 "2024-02-27T01:03:34Z")

</div>

ROS has a package called cv\_camera which is a thin layer over opencv to make a convenient interface with ROS. I have a Raspi Camera V2 connected by ribbon to a raspberry Pi 4. Does that camera have an inherent ability t…

---

## [What should I do if I encounter an error while using the cv:: merge function in opencv 4.8.1？](https://forum.opencv.org/t/what-should-i-do-if-i-encounter-an-error-while-using-the-cv-merge-function-in-opencv-4-8-1/15746)

<div class="topic-metadata">

**Author:** [@TungChiahui](https://forum.opencv.org/u/TungChiahui)\
**Replies:** 0\
**Last updated:** [December 6, 2023, 1:10am UTC](https://forum.opencv.org/t/what-should-i-do-if-i-encounter-an-error-while-using-the-cv-merge-function-in-opencv-4-8-1/15746 "2023-12-06T01:10:08Z")

</div>

please help me,thank you!!! error: terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(4.8.1) /home/tungchiahui/Downloads/opencv-4.8.1/modules/imgproc/src/color.simd\_helpers.hpp:92: error…

---

## [Reading depth in mm from ros depth image](https://forum.opencv.org/t/reading-depth-in-mm-from-ros-depth-image/15037)

<div class="topic-metadata">

**Author:** [@frapi](https://forum.opencv.org/u/frapi)\
**Replies:** 0\
**Last updated:** [October 31, 2023, 2:34pm UTC](https://forum.opencv.org/t/reading-depth-in-mm-from-ros-depth-image/15037 "2023-10-31T14:34:38Z")

</div>

I want to read a depth image from ros. I subscribe to the /camera/aligned\_depth\_to\_color/image\_raw/compressed topic published by a intel realsense D435i camera. I get a sensor\_msgs CompressedImage ros msg, the image has …

---

## [Using opencv\_contrib with python and ROS](https://forum.opencv.org/t/using-opencv-contrib-with-python-and-ros/14736)

<div class="topic-metadata">

**Author:** [@frapi](https://forum.opencv.org/u/frapi)\
**Replies:** 13\
**Last updated:** [October 5, 2023, 7:47am UTC](https://forum.opencv.org/t/using-opencv-contrib-with-python-and-ros/14736 "2023-10-05T07:47:14Z")

</div>

Hello, I’ve installed OpenCv 4.8.0 with contribs and linked it with ROS. I can use the extra modules with C++ nodes, but I can’t with Python. I found that I have to rebuild OpenCv with OPENCV\_ENABLE\_NONFREE = ON, but i…

---

## [How to build OpenCV 4 debian .deb packages properly?](https://forum.opencv.org/t/how-to-build-opencv-4-debian-deb-packages-properly/759)

<div class="topic-metadata">

**Author:** [@ipetrov](https://forum.opencv.org/u/ipetrov)\
**Replies:** 3\
**Last updated:** [September 19, 2023, 5:54am UTC](https://forum.opencv.org/t/how-to-build-opencv-4-debian-deb-packages-properly/759 "2023-09-19T05:54:04Z")

</div>

I use ROS Noetic built from source on Raspberry PI 4 armhf debian buster platform. When I install ROS dependencies - it installs OpenCV debian packages libopencv-\* , available on Index of /debian , which are compiled O…

---

## [AprilTag and its Homography Matrix](https://forum.opencv.org/t/apriltag-and-its-homography-matrix/12593)

<div class="topic-metadata">

**Author:** [@Whatever](https://forum.opencv.org/u/Whatever)\
**Replies:** 2\
**Last updated:** [April 12, 2023, 11:08am UTC](https://forum.opencv.org/t/apriltag-and-its-homography-matrix/12593 "2023-04-12T11:08:33Z")

</div>

Hey guys, I am currently using AprilTag’s in my project in ROS2 and everything works fine. The only things I still struggle with, is the data, which I get from the detection’s of the AprilTag. I am using this package h…

---

## [Imdecode crashing](https://forum.opencv.org/t/imdecode-crashing/12109)

<div class="topic-metadata">

**Author:** [@Qjbg73](https://forum.opencv.org/u/Qjbg73)\
**Replies:** 4\
**Last updated:** [February 27, 2023, 9:32am UTC](https://forum.opencv.org/t/imdecode-crashing/12109 "2023-02-27T09:32:00Z")

</div>

Hello everyone, I didn’t know exactly where to post this question as it is related both with Arduino and with openCV. I have an esp32-cam that is sending image bytes (JPEG format) through sockets to a ROS2 c++ node. This…

---

## [Inquiry for tutorials how to use OpenCV tools for Aruco marker on ROS2 Foxy](https://forum.opencv.org/t/inquiry-for-tutorials-how-to-use-opencv-tools-for-aruco-marker-on-ros2-foxy/11436)

<div class="topic-metadata">

**Author:** [@vladimir\_lenin](https://forum.opencv.org/u/vladimir_lenin)\
**Replies:** 0\
**Last updated:** [December 28, 2022, 2:16am UTC](https://forum.opencv.org/t/inquiry-for-tutorials-how-to-use-opencv-tools-for-aruco-marker-on-ros2-foxy/11436 "2022-12-28T02:16:21Z")

</div>

Is there any tutorials of opencv how to use aruco markers on ROS2 Foxy environment? I know there is one for case of ROS, but not sure for case of ROS2(Foxy). Thanks.

---

## [Depth image/disparity](https://forum.opencv.org/t/depth-image-disparity/11014)

<div class="topic-metadata">

**Author:** [@aristow](https://forum.opencv.org/u/aristow)\
**Replies:** 5\
**Last updated:** [November 18, 2022, 4:50pm UTC](https://forum.opencv.org/t/depth-image-disparity/11014 "2022-11-18T16:50:42Z")

</div>

Hi, i need a small help with some matter that i cant wrap my head arround. Im trying to publish a disparity map of a stereo camera, i wrote this node here and i keep getting this error when after starting the node : co…

---

## [ImportError: libopencv\_core.so.4.2:cannot open shared object file no such file or directory](https://forum.opencv.org/t/importerror-libopencv-core-so-4-2-cannot-open-shared-object-file-no-such-file-or-directory/10762)

<div class="topic-metadata">

**Author:** [@mazik](https://forum.opencv.org/u/mazik)\
**Replies:** 1\
**Last updated:** [November 1, 2022, 4:00pm UTC](https://forum.opencv.org/t/importerror-libopencv-core-so-4-2-cannot-open-shared-object-file-no-such-file-or-directory/10762 "2022-11-01T16:00:25Z")

</div>

\[ERROR\] \[1667310613.036370, 1416.343000\]: bad callback: \<function camera\_right\_callback at 0x7f477f549700\> Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, …

---

## [ROS + OpenCV 4.5.2 Color correction model SIGSEGV](https://forum.opencv.org/t/ros-opencv-4-5-2-color-correction-model-sigsegv/6324)

<div class="topic-metadata">

**Author:** [@Janphr](https://forum.opencv.org/u/Janphr)\
**Replies:** 0\
**Last updated:** [November 20, 2021, 2:09pm UTC](https://forum.opencv.org/t/ros-opencv-4-5-2-color-correction-model-sigsegv/6324 "2021-11-20T14:09:31Z")

</div>

Hey, I’m trying to get this example to work inside a ROS node, but when I get to the line model1.run(); the process dies. If I set up the color correction in a separate project, it works fine. Any idea what might cause…

---

## [Undefined reference IPP when building against OpenCV 4.5.2](https://forum.opencv.org/t/undefined-reference-ipp-when-building-against-opencv-4-5-2/9615)

<div class="topic-metadata">

**Author:** [@RyeGuy](https://forum.opencv.org/u/RyeGuy)\
**Replies:** 6\
**Last updated:** [July 25, 2022, 7:23am UTC](https://forum.opencv.org/t/undefined-reference-ipp-when-building-against-opencv-4-5-2/9615 "2022-07-25T07:23:18Z")

</div>

I am building OpenCV 4.5.2 with the cudadnn support on Ubuntu 20.04. The OpenCV build is successful. However when building a catkin workspace with an executable that references this version of OpenCV the following error …

---

## [Imdecode function returns empty array](https://forum.opencv.org/t/imdecode-function-returns-empty-array/8656)

<div class="topic-metadata">

**Author:** [@kursatkomurcu](https://forum.opencv.org/u/kursatkomurcu)\
**Replies:** 3\
**Last updated:** [May 6, 2022, 9:25am UTC](https://forum.opencv.org/t/imdecode-function-returns-empty-array/8656 "2022-05-06T09:25:17Z")

</div>

Hello Community, I am trying to compress image datas and send them using udp protocol but in final step, imdecode funtion returns empty array even though my vector is not empty. How can I fix this? Tools: C++, Ros2 Fox…

---

## [Kalman Filter with OpenCV (C++), Assertion failed (a\_size.width == len) in gemm](https://forum.opencv.org/t/kalman-filter-with-opencv-c-assertion-failed-a-size-width-len-in-gemm/6767)

<div class="topic-metadata">

**Author:** [@diogofd8](https://forum.opencv.org/u/diogofd8)\
**Replies:** 3\
**Last updated:** [December 16, 2021, 8:09pm UTC](https://forum.opencv.org/t/kalman-filter-with-opencv-c-assertion-failed-a-size-width-len-in-gemm/6767 "2021-12-16T20:09:11Z")

</div>

'm trying to create a simple Kalman Filter tracker using the openCV library. I based on tutorials for similiar goals in: http://opencvexamples.blogspot.com/2014/01/kalman-filter-implementation-tracking.html Object Tracki…

---

## [Conflict between OpenCV 4 and cv\_bridge](https://forum.opencv.org/t/conflict-between-opencv-4-and-cv-bridge/6438)

<div class="topic-metadata">

**Author:** [@Elektron97](https://forum.opencv.org/u/Elektron97)\
**Replies:** 1\
**Last updated:** [November 26, 2021, 5:34pm UTC](https://forum.opencv.org/t/conflict-between-opencv-4-and-cv-bridge/6438 "2021-11-26T17:34:43Z")

</div>

Hi everyone. I’m starting a project with OpenCV with ROS and i need to use xfeatures2d that is in opencv\_contrib. I follow this instructions and modify my CMake File in this way: cmake\_minimum\_required(VERSION 3.0.2) pr…

---

## [How to distinguish this line](https://forum.opencv.org/t/how-to-distinguish-this-line/5138)

<div class="topic-metadata">

**Author:** [@gup\_08](https://forum.opencv.org/u/gup_08)\
**Replies:** 1\
**Last updated:** [September 11, 2021, 10:52am UTC](https://forum.opencv.org/t/how-to-distinguish-this-line/5138 "2021-09-11T10:52:57Z")

</div>

I have the following code that I’ve been struggling to follow a simple white line. The problem comes if it’s outside and the sun/shadow start changing the color that the camera sees. I am using RGB to HSV to see the gro…

---

## [OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor](https://forum.opencv.org/t/opencv-error-assertion-failed-scn-3-scn-4-in-cvtcolor/3814)

<div class="topic-metadata">

**Author:** [@user\_name](https://forum.opencv.org/u/user_name)\
**Replies:** 2\
**Last updated:** [June 13, 2021, 8:57am UTC](https://forum.opencv.org/t/opencv-error-assertion-failed-scn-3-scn-4-in-cvtcolor/3814 "2021-06-13T08:57:07Z")

</div>

hi trying to use imshow and getting this error OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor my code is cv::Mat cvImage = cv\_bridge::toCvCopy(\*msg, sensor\_msgs::image\_encodings::BGR8)-\>image; cv::…

---

## [Assertion error in opencv aruco estimatePoseSingleMarkers() -PYTHON-](https://forum.opencv.org/t/assertion-error-in-opencv-aruco-estimateposesinglemarkers-python/1310)

<div class="topic-metadata">

**Author:** [@MohamadHalwani](https://forum.opencv.org/u/MohamadHalwani)\
**Replies:** 1\
**Last updated:** [May 31, 2021, 8:24pm UTC](https://forum.opencv.org/t/assertion-error-in-opencv-aruco-estimateposesinglemarkers-python/1310 "2021-05-31T20:24:05Z")

</div>

I’m having assertion error in opencv using python. I will post first the code then the error from the terminal. #Aruco properties self.aruco\_dict = aruco.Dictionary\_get(aruco.DICT\_5X5\_50) self.aruco\_size = …
