Comments (3)
@k-sekiya Welcome to open source programming.
The code you posted looks not related to this repository, so it's better to post to a forum for general ROS community like https://answers.ros.org/ .
Seemingly, you specified the desired encoding of converted images to the same as original images here [1]:
cv::Mat in_img = cv_bridge::toCvCopy(msg, msg->encoding)->image;
So the encoding of in_img
can be any encoding depending on the encoding of input images.
However, in cvtColor
function, you assume BGR
as the encoding of the input image.
Here if the encoding of the input image is not BGR
, it can occur such an error.
cv::cvtColor(face_img, gray, CV_BGR2GRAY);
But I did not execute your code, so it might not be true.
Hope it helps you.
from opencv_apps.
@furushchev Thank you.
from opencv_apps.
@k-sekiya Is your problem solved?
Please could you refer the link if you post a question to other sites like answers.ros.org just for helping those who may suffer the same problem that you met?
from opencv_apps.
Related Issues (20)
- Image histogram
- Depth map as input
- Histogram equalization HOT 4
- Should we still mantain EOL distribution?
- missing "adding_images_nodelet" documentation at ROS Wiki HOT 2
- closed expect for overview and nick jj and my older kids and sethb
- Error when running face_detection.launch on ros HOT 1
- face_recognition.launch HOT 1
- Regression in Kinetic re OpenCV 3.3 HOT 3
- Inverse perspective map HOT 2
- Threshold being reset to 50 for hough_lines HOT 6
- How to develope a project based on the excellent opencv_apps? HOT 2
- Port opencv_apps to ROS2 HOT 3
- Issue finding opencv_apps executables HOT 2
- Require branches to be up to date before merging HOT 1
- Debug view: Publish image instead opening OpenCV window HOT 4
- Error about face_recognition.launch HOT 8
- how to use opencv_apps to extract particular contour points?
- Image processing error in testpyramids_test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv_apps.