Giter VIP home page Giter VIP logo

Comments (15)

sladomic avatar sladomic commented on June 30, 2024 1

I think that's really a problem. For that I think you would need 2 cameras so you could also measure the distance. But maybe you can find an algorithm for measuring the distance and then adjust the width/height..

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

Is it possible to get real world height and width of face from the bound rect thats drawn around face?

from android-face-recognition-with-deep-learning-library.

sladomic avatar sladomic commented on June 30, 2024

No, you would need to use another detector for facial features I guess. But you could try it out with the code you already have (e.g. OpenCV CascadeClassifier)

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

Okay thank you... It appears to be bit hard... It depends on the focal distance... If the focal distance changes, the measurement varies... Also the angle of the plane upon which the mobile is resting has got a significant effect on measuring real world dimensions of face or any object that has to be measured.. Do you have any idea about getting real world measurements?

from android-face-recognition-with-deep-learning-library.

sladomic avatar sladomic commented on June 30, 2024

I don't see any easy solution for this and you would need to have a reference object to calibrate (e.g. a CD, since this is common and everyone has one at home).

Here's a tutorial which demonstrates measurement using OpenCV http://www.pyimagesearch.com/2016/03/28/measuring-size-of-objects-in-an-image-with-opencv/

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

I tried whats in pyimagesearch. It works sometimes but if i vary the distance of the camera from the object being measured, the width varies too... :(

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

Ya Im having hard time in doing so.. wondering how they measure it in mtailor app

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

In our Library, in case if I have to remove a person from memory, how will i remove?

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

I have a suggestion. Instead of initialising opencv in all activities, you can initialise in Application class once and use it throughout the app life cycle as follows,

public class SampleInit extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        if(!OpenCVLoader.initDebug()){
            
        }
    }
}

Then in your AndroidManifest.xml, you can include the above class file within <application tag as android:name=".SampleInit".

Failing to mention it in manifest file will crash by the way..

from android-face-recognition-with-deep-learning-library.

sladomic avatar sladomic commented on June 30, 2024

@Zumbalamambo if you want to remove a person you need to delete the folder in the file system (e.g. /sdcard/Pictures/facerecognition/training/Michael)

Yes, that's a good input with the Application class. If you already implemented and tested it you can open a pull request and I can merge it into the library.

from android-face-recognition-with-deep-learning-library.

sladomic avatar sladomic commented on June 30, 2024

Oops :)

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

okay sure.. i have to find how to push and open pull request . :) Im new to all these hehehe

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

Have you ever tried background subtraction? it is not accurate if we use absdiff.

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

so I tried using alpha blending as in learn open cv

 //Convert bitmap to mat
        Utils.bitmapToMat(foregroundBitmap, foreground);
        Utils.bitmapToMat(backgroundBitmap, background);
        Utils.bitmapToMat(alphaBitmap, alpha);

        // Convert Mat to float data type
        foreground.convertTo(foreground, CV_32FC3);
        background.convertTo(background, CV_32FC3);

        // Normalize the alpha mask to keep intensity between 0 and 1
        alpha.convertTo(alpha, CV_32FC3, 1.0/255);

       // Storage for output image
        Mat ouImage = Mat.zeros(foreground.size(), foreground.type());


        // Multiply the foreground with the alpha matte
        multiply(alpha, foreground, foreground);

        multiply(1.0-alpha, background, background);


        add(foreground, background, ouImage);

but then it throws an error like following

Error:(62, 21) error: bad operand types for binary operator '-' first type: double second type: Mat

Can you please help me to sort this? How do I subtract a mat from scalar

from android-face-recognition-with-deep-learning-library.

Zumbalamambo avatar Zumbalamambo commented on June 30, 2024

sorry...:( I did the same mistake.. pressed the bigger button instead of smaller one :)

from android-face-recognition-with-deep-learning-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.