android


how to link face detector api with the photo activity


public class PhotoActivity extends Activity implements SurfaceHolder.Callback {
private ImageView imageView;
private SurfaceView mSurfaceView;
private Bitmap bmp;
private SurfaceHolder mSurfaceHolder;
private Camera mCamera;
private Parameters parameters;
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mSurfaceView = (SurfaceView) findViewById(R.id.surface_camera);
imageView = (ImageView) findViewById(R.id.image_view);
mSurfaceHolder = mSurfaceView.getHolder();
mSurfaceHolder.addCallback(this);
mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
#Override
public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
parameters = mCamera.getParameters();
mCamera.setParameters(parameters);
mCamera.startPreview();
Camera.PictureCallback mCall = new Camera.PictureCallback() {
#Override
public void onPictureTaken(byte[] data, Camera camera) {
bmp = BitmapFactory.decodeByteArray(data, 0, data.length);
imageView.setImageBitmap(bmp);
mSurfaceView.setVisibility(View.INVISIBLE);
// Call web service
SendPhotoAsync photoToWeb = new SendPhotoAsync(data);
photoToWeb.execute();
}
};
mCamera.takePicture(null, null, mCall);
}
#Override
public void surfaceCreated(SurfaceHolder holder) {
mCamera = Camera.open();
mCamera.setDisplayOrientation(90);
try {
mCamera.setPreviewDisplay(holder);
} catch (IOException exception) {
mCamera.release();
mCamera = null;
}
}
#Override
public void surfaceDestroyed(SurfaceHolder holder) {
mCamera.stopPreview();
mCamera.release();
mCamera = null;
}
#Override
protected void onResume() {
super.onResume();
}
#Override
protected void onPause() {
super.onPause();
}
how i could modify this code to detect face on camera preview,using face detector api in android.. any help please..
i also want to detect eyes then..hope someone can help me..i went through thiswhich works on button click.in my case for taking photo no button click is there..
someone with some productive code will be appreciable..please help me its very critical
if you have the android API for face detector..call this activity from the photo activity..in photo activity save the captured image to sd card...read this file in the face detector api..thus we can make it..but samsung galaxy+google nexus doesnt perform face detection..AAkash does..

Related Links

The user input to the database is not getting captured
Understanding Vertex Array in NDK GLES
How can I create the Facebook event using intent from my android app?
Retrofit 2: Get JSON from Response body
how do i set exit transition(explode) to my Staggeredgrid layout views inside a sliding tab layout
How to connect web api via volley in android
ANDROID - using RatingBar in ListView to send data at MySQL
how to make facebook messenger group image in android app?
Android continuous integration using codeship
Proper searching not possible in list view with check box
How to render views dynamically for restaurant table selection?
Moto E first generation not working wifi, bluetooth, sound and calls
Android studio build failed exception while build with different emulator?
Facebook SDK not working in Amazon Kindle Fire device
Android Studio not detected my usb device - ubuntu
Convert EditText input to integer and multiply?

Categories

HOME
cygwin
azure-stream-analytics
oracle12c
prism
apache-jena
css3
ns-3
interface
pclxl
owl-carousel
sublimetext
simulink
alsa
babeljs
android-json
crystal-lang
project
endeca
mel
mxgraph
openbugs
altera
gruntfile
dynamic-sql
chargify
forgot-password
oledb
topology
spring-async
libigl
pagespeed
stackexchange
carrierwave
mobx
deltaspike
linkedhashmap
login-script
openwhisk
reverse
sim-toolkit
parse-tree
alphabetical
dm-script
release
projects-and-solutions
recurrent-neural-network
plaintext
branching-and-merging
show-hide
x++
sonarlint-eclipse
serde
convex-optimization
posixct
carrot2
static-cast
android-testing
otp
monkey
d3-force-directed
objectscript
restore
simplepie
xcode-server
shopping
gcloud-ruby
turbo-prolog
html-to-pdf
jaunt-api
qt5.2
avisynth
jdi
flock
include-guards
google-books
doctype
dnssec
dot.js
angular-gettext
crowd
metatrader5
spy++
genymotion-call
paw
codeplex
reflector
ray
android-usb
ie8-compatibility-mode
rolify
scringo
nevron
dolby-audio-api
windows-98
swfobject
asplinkbutton
wimax
device-width
jdb
mapping-by-code
oracle-enterprise-linux
box2d-iphone
workflow-services
codebase
squishit
vs-android
eclipse-marketplace
xpsdocument
localizable.strings

Resources

Encrypt Message