Skip to content
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

How to make the modular work without python? #13

Open
Marguse1 opened this issue Jun 9, 2019 · 2 comments
Open

How to make the modular work without python? #13

Marguse1 opened this issue Jun 9, 2019 · 2 comments

Comments

@Marguse1
Copy link

Marguse1 commented Jun 9, 2019

通过对底层的一些测试,我发现整个底层在c语言在python语言的转化过程中耗费了不少时间,这样就导致了帧率的降低,想请教一下宋工程师有没有一个好的优化方法来使得这个转化时间减小,或者是让整个模块脱离python语言,直接使用c语言进行编写。

@RockySong
Copy link
Owner

这个整体工作量比较大,尤其是py_image.c暴露的API。事实上如果移除python api,已经不能再说和openmv的使用兼容了,开发模式也不再是无需存盘和烧写立即见效。另外,C代码也部分依赖mpy的垃圾收集器,以及其它少量mpy的基础数据结构。
其实,对于多数计算量比较大的API,python与C之间转换的开销就很小了。
当然,对于一些实际的项目,可能只用比较单一的机器视觉功能。这就需要针对性地“特事特办”深度定制。
目前,在这个项目里还没有计划移除micropython.

@Marguse1
Copy link
Author

嗯嗯,明白了,感谢您的答复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants