OpenFrameworks画笔工具实现
我正在研究开放框架。
我制作了一个应用程序,可以从实时提要中提取用户的脸部并将其投影到所选颜色的矩形上。现在我希望用户能够在脸部背景中绘制一些东西。为此,我需要实现一个画笔工具。
面临的问题:
- 如果我将 ofSetBackgroundAuto() 设置为 false,则面部不会从下一帧刷新。
- 如果ofSetBackgroundAuto设置为true,那么画笔就不会绘制,因为背景会一次又一次刷新。
请帮忙!!
I am working on Open Frameworks.
I have made an application that extracts the face of the user from the live feed and projects it on a rectangle of chosen colour. Now I want the user to be able to draw something in the background of the face. To do that I need to implement a brush tool.
Problems faced:
- If I set the ofSetBackgroundAuto() to false, the face does not refresh from the next frame.
- If ofSetBackgroundAuto is set to true, then the brush doesn't draw, because the background is again and again refreshed.
Please help !!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 Fbo 的帧缓冲区对象 https://github .com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/gl/ofFbo.h
You can use a frame buffer object ofFbo https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/gl/ofFbo.h