AnandMR / javacv

Automatically exported from code.google.com/p/javacv
0 stars 0 forks source link

cvResize exception #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Can anyone confirm the opencv function cvResize is working or provide a working 
example?

I've had a look through the docs and haven't found anything useful.

Here is the example code I'm trying, it manages to open the file and save it OK 
if I comment out the cvResize line. I get the exception in the log using 
cvResize

'java.lang.RuntimeException: Unknown exception'

and nothing else I'm afraid.

IplImage in=cvLoadImage("test_in.jpg");
IplImage out=IplImage.createHeader(100,60, in.depth(), in.nChannels());
cvResize(in,out,CV_INTER_LINEAR);  
cvSaveImage("test_out.jpg",in);//Sanity check read is working ok

Using latest build opencv2.2.0 on Android, resizing a simple colored .jpg

Original issue reported on code.google.com by dbrrredp...@googlemail.com on 19 May 2011 at 4:35

GoogleCodeExporter commented 9 years ago
Call IplImage.create(), *not* IplImage.createHeader()

Original comment by samuel.a...@gmail.com on 19 May 2011 at 9:41

GoogleCodeExporter commented 9 years ago
Nice one, old opencv habbits die hard ;)

Original comment by dbrrredp...@googlemail.com on 19 May 2011 at 11:13