cvCvtColor( const CvArr* src, CvArr* dst, int code )

76 views
Skip to first unread message

wee chang

unread,
Apr 7, 2005, 1:14:44 PM4/7/05
to EE4...@googlegroups.com
Hi,
IplImage* m_image = m_camera.GetFrame().GetImage();
IplImage* image0 = m_canvas.GetImage();

cvCvtColor(m_image, image0 , 20); //constant 20 = BGR2HGV

i got error "In function cvCvtColor(): Bad Number of channels"

anyone knows the problem?? or i did the wrong way...pls advice

Thanks!!!

Eunkwang Park

unread,
Apr 7, 2005, 11:24:03 PM4/7/05
to EE4...@googlegroups.com
Hi,

I don't understand why you are using m_camera.GetFrame().GetImage() to get
original image if you are using cvcamdemo example.
You can just use "image" for original image and creating new variable with
IplImage structure for conversion RGB to HSV.
If you don't find the function for creating, let me know.
For error part, could you try to set the parameter to CV_BGR2HSV?

Thanks
Eunkwang Park

Liew Wee Chang

unread,
Apr 8, 2005, 2:57:32 AM4/8/05
to EE4...@googlegroups.com
Hi,
thks Dr. Park for answering my question, i've solved the problem....
Reply all
Reply to author
Forward
0 new messages