Android: Acessing front facing camera for Android 2.3 - android

There really seems to be no information on how to acess the front facing camera on android phones (gingerbread).
Could someone please point me to a page or post that explains how it's done?
Thanks!

Here is an example on how to access different cameras and switch between them: CameraPreview
The link is not accessible right now, Google has moved the Sample Project.
Please import a Sample Project and find it at:
ApiDemos/com.example.android.apis.graphics/CameraPreview.java

Mat be this might help you How to use Front Facing Camera on Samsung Galaxy S
As for 2.3 Camera you can try this method passing the camera ID

Related

can we use camera for real time face detection in android app without having a capturing option in them

I am working on an android application which detect faces in real time and for that i have to make a camera to scan faces but i do not want to give a capture facility in that camera and after detection the next option of filters will come automatically. So, is this possible?
Yes of course,it is possible and OpenCV do that all for you... follow the given links:
1. Demo:
2. OpenCV sample code
3. OpenCV
Thanks,

Android Camera API Advance Features

I am to start working on an Android Custom Camera App. I just want to know is there any way to add the following features to my app:
Beauty Level
Red Eye Removal
Acne Removal
I just want to know that if it is possible, can someone suggest or give me any idea how can code it into my app.
Though I am familiar with Android Camera API functions, and worked on several simple custom camera apps.
Thanks in advance
For beginning, you can use FaceDetector to detect faces in the picture.For example , you can remove Red eyes by searching for Red pixels in the picture and try to decrease red level of them.And also , you can use OpenCV for detecting eyes.I found a sample for eye detection in Here

Using Camera without preview or surface in android

I was looking for a method to use the camera on android devices without a surfaceview or a preview. I found out that, it is impossible to take picture without that preview. However, I have found a tutorial which is actually working taking pictures without a preview. Here is the link: http://www.vogella.com/articles/AndroidCamera/article.html
After switching the camera in the code from front to back-facing the app didn't crashed but it gave me an error 100. So it is only working with the front cam at the moment.
I am using a Samsung Galaxy S3(4.1.2) and i will test it on a Galaxy S2 and a Galaxy S3 Mini.
Anyone a good explanation for this?
You cannot take a picture without starting preview.
While some Android devices are more flexible, and allow takePicture to be called without preview running, this is technically against the API specifications.
It won't work on a large number of devices, so please don't rely on it. That tutorial is wrong, and presumably tested only on one of the devices that allows this behavior.
If you don't want a visible preview, see this question for ways to do that in Android versions >= 3.0.
Actually the time interval of question and answer is large, but may help others.
You can try this library to take picture even from service:
https://github.com/kevalpatel2106/android-hidden-camera
It uses a feature to draw over other apps and create a fake surface. Hope it helps.

Android Face Detection using OpenCV/JavaCV

I want to know how I implement Android Face Detection using OpenCV/JavaCV. Any one have idea about that or have code please comment on this or put the code. I want get faces from the Phone Gallery and detect them..
For face detectiion you can use the built in FaceDetector in the Android SDK, It returns face positions and angles in BMPs. But it's not very fast.
You can Also use the javaCV face detection but before to start i recommend you to see this article to see advantages and constarint of some API that you can use and also compare Performance
For FaceDetector you can see these links
Link 1
Link 2
Here's a realtime face detection sample using FaceDetector and OpenGL (draws rectangles) which works in Android 2.2
You can also use OpenCV in Android
You'd better try this on Linux (I've tried it on Windows, but failed).
Finally JavaCV (strongly recommended)
There is a sample code of realtime face detection using the camera. See "javacv-src-*.zip" on the download page.
The timing figures on the screenshot from K_Anas are shockingly slow... my app on my HTC Desire S with the OpenCV library (here) does 4+ fps...
My demo app on Play Store (eurgh) is here. In the menu the first item takes you to my web page for the app with source code snippets. 1) install OpenCV, 2) get the supplied samples running, 3) edit "Tutorial 2 OpenCVSamples" and drop my code snippets into the frame processing loop.
I claim no credit for the app, it is just a slightly enlarged and adjusted version of the sample which comes with the OpenCV library.

Android face detector using android camera

I've read its possible to use the built in android face detector to find the position of faces in a bitmap. Does anyone know of any examples of doing this using the camera as an input?
Its possible with the Face Detection APIs in ICS. Refer the camera section on this page:
http://developer.android.com/sdk/android-4.0.html
You must register a FaceDetectionListener and then call camera.startFaceDetection(). Please read the link above for more details.
I wrote some sample code. It isn't perfect since its Work In Progress but the face detection bit works just fine:
https://docs.google.com/open?id=0B2Nu5U2Cz81qZExGQ25sWVdRd21IOExUUTZsZzFoZw

Categories

Resources