How to access a mobile’s camera from a web app?

In iPhone iOS6 and from Android ICS onwards, HTML5 has the following tag which allows you to take pictures from your device: <input type=”file” accept=”image/*” capture=”camera”> Capture can take values like camera, camcorder and audio. I think this tag will definitely not work in iOS5, not sure about it.

Get Path of image from ACTION_IMAGE_CAPTURE Intent

This is how it works on 2.2 (different than on previous versions). When starting intent String fileName = “temp.jpg”; ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE, fileName); mCapturedImageURI = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, mCapturedImageURI); startActivityForResult(intent, CAPTURE_PICTURE_INTENT); you need to remember mCapturedImageURI. When you capture image, in onActivityResult() use that URI to obtain … Read more

How to capture an image and store it with the native Android Camera

Here was the final product in case anyone is still visiting this thread: public class CameraCapture extends Activity { protected boolean _taken = true; File sdImageMainDirectory; protected static final String PHOTO_TAKEN = “photo_taken”; @Override public void onCreate(Bundle savedInstanceState) { try { super.onCreate(savedInstanceState); File root = new File(Environment .getExternalStorageDirectory() + File.separator + “myDir” + File.separator); root.mkdirs(); … Read more

How to use web camera in android emulator to capture a live image?

Download all the source files listed on the page: CameraSource, GenuineCamera, HttpCamera, SocketCamera, BitmapCamera, and WebcamBroadcaster. Create a package in your project called com.tomgibara.android.camera and place the first 4 source files inside. Download JMF from here and install it. Compile WebcamBroadcaster using the following command: “C:\Program Files (x86)\Java\jdk1.6.0_15\bin\javac.exe” -classpath “C:\Program Files (x86)\JMF2.1.1e\lib” WebcamBroadcaster.java or what’s … Read more

python pygame.camera.init() NO vidcapture

I met the same problem. The error info of “ImportError: No module named vidcap” indicates that python interpreter didn’t find the vidcap module on you machine. so you’d better follow these steps. Download the vidcap from http://videocapture.sourceforge.net/ 2.Then copy the corresponding version of dll (which named “vidcap.pyd” in VideoCapture-0.9-5\VideoCapture-0.9-5\Python27\DLLs) to “your python path”\DLLs\ . 3.restart … Read more

Getting frames from Video Image in Android

Ok what we ended up doing is using the onPreviewFrame method and decoding the data in a seperate Thread using a method which can be found in the android help group. decodeYUV(argb8888, data, camSize.width, camSize.height); Bitmap bitmap = Bitmap.createBitmap(argb8888, camSize.width, camSize.height, Config.ARGB_8888); … // decode Y, U, and V values on the YUV 420 buffer … Read more

Three.js camera tilt up or down and keep horizon level

In three.js, an object’s orientation can be specified by its Euler rotation vector object.rotation. The three components of the rotation vector represent the rotation in radians around the object’s internal x-axis, y-axis, and z-axis respectively. The order in which the rotations are performed is specified by object.rotation.order. The default order is “XYZ” — rotation around … Read more

How to set Android camera orientation properly?

From other member and my problem: Camera Rotation issue depend on different Devices and certain Version. Version 1.6: to fix the Rotation Issue, and it is good for most of devices if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { p.set(“orientation”, “portrait”); p.set(“rotation”,90); } if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { p.set(“orientation”, “landscape”); p.set(“rotation”, 90); } Version 2.1: depend on kind … Read more