android - Capture frame in opencv camera and intent -


@suppresslint("simpledateformat") @override     public boolean ontouch(view v, motionevent event) {     log.i(tag, "ontouch event");     simpledateformat sdf = new simpledateformat("yyyy-mm-dd_hh-mm-ss");     string currentdateandtime = sdf.format(new date());     string savedir = environment.getexternalstoragedirectory().getpath() + "/dcim/ocv/touchsave";     file dircheck = new file(savedir);     if(!dircheck.exists()) {         dircheck.mkdirs();     }     string filename = savedir + "/touch_picture_" + currentdateandtime + ".jpg";     try {         mopencvcameraview.takepicture(filename);          toast.maketext(this, filename + " saved", toast.length_short).show();     } catch(exception ex) {         ex.printstacktrace();     }      last_photo_name = filename;      return false; } 

this current touchscreen capture function , opencv library camera.this works fine , can save image sdcard. however, hope intent activity after capturing photo. final result cannot capture photo (i have checked storage) can intent activity.

    intent intent = new intent();     intent.setclass(showcameraviewactivity.this,captureactivity.class);     intent.putextra("path", last_photo_name);     startactivity(intent); 

this line of code added. can me add these lines of code can capture photo? thank much.

also, got questions. i added button on opencv cameraview cannot add above capture function on onclick function. how can add them onclick function??thank much.


Comments

Popular posts from this blog

How to get the arclen between two curve points in Maya? -

C++ Linked List -

git svn - Unignore directories in git-svn (adding directories to a sparse checkout) -