Ask Your Question

Jay_sil_viper's profile - activity

2013-05-02 05:28:12 -0500 received badge  Editor (source)
2013-05-02 05:26:49 -0500 asked a question CVTConvert inplace not working.

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 );

   counter++;

}

}

.... Gives error as follows, OpenCV Error: Assertion failed (dst.data == dst0.data) 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) dst.data == dst0.data

at com.googlecode.javacv.cpp.opencv_imgproc.cvCvtColor(Native Method)
at convert_color_space.convert_color(convert_color_space.java:16)
at sum.main(sum.java:199)