i trying use imgcodecs.imwrite in opencv android application keeps giving error:
no implementation found boolean org.opencv.imgcodecs.imgcodecs.imwrite_1(java.lang.string, long) (tried java_org_opencv_imgcodecs_imgcodecs_imwrite_11 , java_org_opencv_imgcodecs_imgcodecs_imwrite_11__ljava_lang_string_2j)
my code is:
private void takephoto(final mat rgba) { imgproc.cvtcolor(rgba, mbgr, imgproc.color_rgba2bgr, 3); string basedir = environment.getexternalstoragedirectory().getabsolutepath(); string filename = "myfile.jpg"; imagefile = new file(basedir + file.separator + filename); imgcodecs.imwrite(imagefile.tostring(), mbgr); final intent intent = new intent(this, labactivity.class); intent.putextra(labactivity.extra_photo_data_path, imagefile.tostring()); startactivity(intent); }
many thanks
i have solved it. version should declared follows:
opencvloader.initasync(opencvloader.opencv_version_3_0_0,
Comments
Post a Comment