Ask Your Question
0

CVTConvert inplace not working.

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

Jay_sil_viper gravatar image

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

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)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

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

Qichao Chen gravatar image

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

  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

Question Tools

Stats

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

Seen: 1,320 times

Last updated: May 03 '13