Ask Your Question

chinthani's profile - activity

2020-11-05 14:04:50 -0600 received badge  Notable Question (source)
2018-06-25 04:02:08 -0600 received badge  Popular Question (source)
2013-09-26 00:00:02 -0600 asked a question Bad argument (Array should be CvMat or IplImage)

when I run the code it gives this error OpenCV Error: Bad argument (Array should be CvMat or IplImage) in unknown function, file ......\src\opencv\modules\core\src\array.cpp, line 1238 Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: ......\src\opencv\modules\core\src\array.cpp:1238: error: (-5) Array should be CvMat or IplImage IplImage imgHSV = cvCreateImage(cvGetSize(orgImg), 8, 3);

IplImage orgImg = cvLoadImage(""+filename); cvSaveImage("Img_save//original.jpg", orgImg); IplImage thresholdleaf = hsvleaf(orgImg);

these lines give the errors.but some images can convert to hsv images.most of images doesn't work.original images are saved as o byte images in image saving folder.what's the reason for that?