Coder Social home page Coder Social logo

dingprog / makeup Goto Github PK

View Code? Open in Web Editor NEW
852.0 23.0 146.0 69.4 MB

让你的“女神”逆袭,代码撸彩妆(画妆)

Home Page: https://juejin.im/post/5d5ff49bf265da03d42fae9c

Java 100.00%
makeup android canvas draw eye lip brow opencv androidopencv

makeup's Issues

request

How can i use it for commercial use

EyeAngleAndScaleCalc.Bean()的成员变量值如何确定

你好,我想用你这个项目实现右眼的美妆相关功能,请问EyeAngleAndScaleCalc.Bean()的成员变量值是根据什么去确定的呢?我看你写的DrawUtils.draw方法直接都是写死的topP1,topP2,topP3等参数

                       case EYE_LASH:
                        //睫毛
                        EyeAngleAndScaleCalc.Bean bean = new EyeAngleAndScaleCalc.Bean();
                        bean.topP1 = new Point(90, 148);
                        bean.topP2 = new Point(246, 83);
                        bean.topP3 = new Point(405, 136);
                        bean.bottomP1 = new Point(45, 8);
                        bean.bottomP2 = new Point(65, 187);
                        bean.bottomP3 = new Point(342, 32);
                        bean.resTop = "lash_res_top.png";
                        bean.resBottom = "lash_res_bottom.png";

                        EyeDraw.drawLash(context, canvas, bean, FacePoint.getLeftEyePoint(faceJson), 80, false);
                        break;
                    case EYE_CONTACT:
                        //美瞳
                        Bitmap contact = BitmapUtils.getBitmapByAssetsName(context, "eye.png");
                        EyeDraw.drawContact(canvas, contact, FacePoint.getLeftEyePath(faceJson),
                                FacePoint.getLeftEyeCenter(faceJson), FacePoint.getLeftEyeRadius(faceJson), 120);

                        Paint paint = new Paint();
                        paint.setColor(Color.WHITE);
                        paint.setStyle(Paint.Style.STROKE);
                        break;
                    case EYE_DOUBLE:
                        //双眼皮
                        EyeAngleAndScaleCalc.Bean doubleBean = new EyeAngleAndScaleCalc.Bean();
                        doubleBean.topP1 = new Point(285, 288);
                        doubleBean.topP2 = new Point(459, 213);
                        doubleBean.topP3 = new Point(633, 288);

                        doubleBean.resTop = "double_eye.png";

                        EyeDraw.drawLash(context, canvas, doubleBean, FacePoint.getLeftEyePoint(faceJson), 150, false);
                        break;
                    case EYE_LINE:
                        //眼线
                        EyeAngleAndScaleCalc.Bean lineBean = new EyeAngleAndScaleCalc.Bean();
                        lineBean.topP1 = new Point(298, 276);
                        lineBean.topP2 = new Point(440, 216);
                        lineBean.topP3 = new Point(604, 266);

                        lineBean.resTop = "eye_line.png";

                        EyeDraw.drawLash(context, canvas, lineBean, FacePoint.getLeftEyePoint(faceJson), 100, false);
                        break;
                    case EYE_SHADOW:
                        //眼影
                        EyeAngleAndScaleCalc.Bean eyeShadow = new EyeAngleAndScaleCalc.Bean();
                        eyeShadow.topP1 = new Point(74, 160);
                        eyeShadow.topP2 = new Point(155, 102);
                        eyeShadow.topP3 = new Point(229, 160);

                        eyeShadow.rect = new Rect(74, 102, 229, 184);

                        eyeShadow.resTop = "eye_shadow.png";

                        EyeDraw.drawShadow(context, canvas, eyeShadow, FacePoint.getLeftEyePath(faceJson), FacePoint.getLeftEyePoint(faceJson), 150);

                        break;

希望大佬能够指教一下,谢谢

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.