Erreur opencv
Bonjour,
Je suis en train de compiler mon code. Cela fonctionne bien sur mon pc I7, mais quand j'essaye sur une carte raspberry pi 3 model B+, j'obtiens :
Je suis en train de compiler mon code. Cela fonctionne bien sur mon pc I7, mais quand j'essaye sur une carte raspberry pi 3 model B+, j'obtiens :
what(): OpenCV(4.1.0) /home/x/opencv_all/opencv-4.1.0/modules/imgproc/src/color.simd_helpers.hpp:92: error: (-2:Unspecified error) in function 'cv::impl::{anonymous}::CvtHelper<VScn, VDcn, VDepth, sizePolicy>::CvtHelper(cv::InputArray, cv::OutputArray, int) [with VScn = cv::impl::{anonymous}::Set<3, 4>; VDcn = cv::impl::{anonymous}::Set<1>; VDepth = cv::impl::{anonymous}::Set<0, 2, 5>; cv::impl::{anonymous}::SizePolicy sizePolicy = (cv::impl::<unnamed>::SizePolicy)2; cv::InputArray = const cv::_InputArray&; cv::OutputArray = const cv::_OutputArray&]'
> Invalid number of channels in input image:
> 'VScn::contains(scn)'
> where
> 'scn' is 1
Aborted
1 réponse
-
Bonjour,
Il faudrait voir le reste du code, mais ton problème semble dû à la manière dont l'image est acquise, qui doit différer en fonction de la machine sur laquelle tu exécutes ton programme. Pour plus de détails, voir cette discussion.
Bonne chance