Ask Your Question

CVTConvert inplace not working.

asked 2013-05-02 05:26:49 -0500

Jay_sil_viper gravatar image

updated 2017-08-07 21:31:45 -0500

Hello Guys,

I am using a javacv and I have a custom class which contains couple fields along with IplImage. Something like this, Class image_info {

IplImage frame;

double value;


I am trying to convert the frame variables in the class variable to another color space. I am doing something like this,

public static void convert_color(ArrayList<shots_structure> ss_frames, int code) {

int counter=0;

while(counter < ss_frames.size())


cvCvtColor(ss_frames.get(counter).frame, ss_frames.get(counter).frame, code );




.... Gives error as follows, OpenCV Error: Assertion failed ( == in unknown function, file ......\src\opencv\modules\imgproc\src\color.cpp, line 3924 Exception in thread "main" java.lang.RuntimeException: ......\src\opencv\modules\imgproc\src\color.cpp:3924: error: (-215) ==

at com.googlecode.javacv.cpp.opencv_imgproc.cvCvtColor(Native Method)
at convert_color_space.convert_color(
at sum.main(
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-05-03 13:42:29 -0500

Qichao Chen gravatar image

updated 2013-05-03 13:44:16 -0500

  1. If you have any question about javacv,you should go to javacv groups,javacv is an independent project.See FQA
  2. You can try this code for init each IplImage:
     IplImage Image = IplImage.create(width, height, IPL_DEPTH_8U, nChannels);
edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2013-05-02 05:26:49 -0500

Seen: 920 times

Last updated: May 03 '13