-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide drawn curves and draw other effects/ android demo #747
Comments
You can disable annotations from the SDK via the drishti::Context class here. This just instantiates the base FaceTracker class where the virtual drawing methods are empty here. If you want to add your own effects at the SDK level you could register your callbacks to receive the frame texture and face models, but you would have to draw to your own display. If you want to draw on the display that is managed by the demo app, you would currently have to modify the internal classes. You could start by looking at drishti::hci::FaceFinderPainter::paint() and the The current wireframe drawing is really just for POC visualization. |
Thank you for you advice! I've got some ideas about the process flow. update: I think the main interaction is that the drawFrame func passes the texid to jni, and then all the processing is based on the image information obtained from the texid; drishti/src/examples/facefilter/lib/facefilter/renderer/Renderer.cpp Lines 132 to 139 in c4c74f0
The m_tracker(FaceTracker) does all the processing and painting, what does the I think after this process, the Thank you for your time! |
Kind of a development vs production.
|
@ruslo Thank you so much! |
@headupinclouds @ruslo Could you give me some tips about the upper question please? It will be really appreciated! |
I can help more tomorrow morning. In addition to the questions above, you are primarily looking for an understanding of the basic pipeline so that you can add your own drawing code, Right? FYI: You can build and run tests on your host machine. That demonstrates the callback tables and basic SDK usage and it might be easier to start with that if you are making changes. |
Thanks. I originally intended to get the original color map to do some effect on the eye area. I thought about it, maybe I can read a texture directly and paste it with opengl. I will give it a try. |
Now I can get the contour of the pupils. Could you please give me some more advices about how can I add the texture to the area wrapped by the contour? Most of the final opengl rendering processes are in this file |
Yes. You can look at FacePainter::annotateEye and potentially modify that to do what you want. I would start by hacking that code to get the effect you want, and then maybe think about updating the SDK to support generic annotations. The current built-in wireframe rendering does have some drawing preparation that occurs on the CPU for better thread utilization, which helps achieve higher frame rates on some older phones (here). For a generic approach you could update the API to support what you want to do. In the Here is the drishti/src/examples/facefilter/lib/facefilter/renderer/FaceTrackerTest.cpp Lines 60 to 67 in c4c74f0
If you actually request frames and/or textures, then the code will pull down any requested images and the main callback will be called. That is FaceTrackTest::callbackFunc in this example. That is implemented by the FaceTrackTest::callback C++ method. I hope that helps. Let me know if something isn't clear. |
Actually, the drishti_hunter_test repository has a more interesting callback table example, which probably illustrates the workflow a little better. I'll inline that here for clarity:
|
First of all, thank you very much for your patience. Now I have a general understanding of the code. I modified the vshader and fshader in FacePainter.cpp to read a texture and then render it to iris in the method |
Hi~could you please give me some advices or hints about how could I hide the detected drawn curves in the demo and add some self-define effects with the eye-related key positions?
And I wonder what is the main difference between the
drishti/android-studio
anddrishti/src/examples/facefilter/android-studio
. Why should we build from the former rather than the latter?Thanks!
The text was updated successfully, but these errors were encountered: