Ask Your Question
0

How to face detection and count face from file bitmap imagesView in android ?

asked 2017-03-29 10:57:22 -0600

How to detect face and count face use CascadeClassifier Method from Bitmap file.

Thanks for your expert :) and sharing.

private void onSelectFromGalleryResult(Intent data) {
Bitmap bitmap;
ImageView imgView;
        try {
            if (data != null) {

                bitmap = MediaStore.Images.Media.getBitmap(getApplicationContext().getContentResolver(), data.getData());
                imgView.setImageBitmap(bitmap);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-03-29 11:00:38 -0600

berak gravatar image

updated 2017-03-29 11:02:59 -0600

well, you need a Mat, not a Bitmap, and the opencv android sdk offers conversion utilities

also have a look at the face-detection sample

edit flag offensive delete link more

Comments

well how to convert to bitmap

Mat image = Imgcodecs.imread(ImagesTrack.class.getResource("").getPath());
Beerus God gravatar imageBeerus God ( 2017-03-29 11:15:05 -0600 )edit

just RTFM, like anyone else, please ..

berak gravatar imageberak ( 2017-03-29 11:22:07 -0600 )edit

do you have sample for detection face from image gallery if i add image gallery then automatic detection face in imageView android use openCV ? if you have sample please share la expert :)

Beerus God gravatar imageBeerus God ( 2017-03-29 12:10:08 -0600 )edit

simply - no.

it's your program, i have no interest in writing it.

berak gravatar imageberak ( 2017-03-29 12:19:42 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-03-29 10:57:22 -0600

Seen: 856 times

Last updated: Mar 29 '17