Closed younes200 closed 5 years ago
I guess that is a problem related to img format,are you using the test.jpg image ?
My bad, wrong img format :) Thanks Achraf for sharing you code !
you are welcome bro :)
Hello, guys can you please provide insight on how you fixed this error
yes please how was the error fixed ? is it because the image was .jpg
?
type error: OpenCV(4.2.0) c:\projects\opencv-python\opencv\modules\imgproc\src\color.simd_helpers.hpp:92: error: (-2:Unspecified error) in function '__cdecl cv::impl::anonymous-namespace'::CvtHelper<struct cv::impl::
anonymous namespace'::Set<3,4,-1>,struct cv::impl::A0xe227985e::Set<1,-1,-1>,struct cv::impl::A0xe227985e::Set<0,2,5>,2>::CvtHelper(const class cv::_InputArray &,const class cv::_OutputArray &,int)'
Invalid number of channels in input image: 'VScn::contains(scn)' where 'scn' is 1
pls help me..
scn is 1 means that there is only one channel present, ergo a gray scale image, however it requires a RGB image with 3 channels. To fix this convert your images form grayscale to RGB first (stack the grayscale images as 3D Matrix or use cvtColor with COLOR_GRAY2RGB
I think the problem is simple. You're converting an already gray_image to a gray_image. So just make a check if no_of_channels==3: then cvtColor(...)
Hi, After traning the Licence_plate_recognition model, runing
python3 main.py -mode predict -i test.jpg -model mlp.pkl
ended with the error :Any thoughts ? thank you in advance. /Y