pezy / imgproc Goto Github PK
View Code? Open in Web Editor NEWUse Simple GUI to study image processing by Qt and OpenCV
License: Apache License 2.0
Use Simple GUI to study image processing by Qt and OpenCV
License: Apache License 2.0
这个应用最直接的需求就是: 试验 OpenCV 的算法. 那么最该首要关注的是: 遇到一个新算法, 想加到这个应用上的步骤.
下面简要总结下目前的过程:
initParamsWidget()
方法. 创建参数配置的 UI.applyTo
方法. 将算法逻辑写在里面.createImageActions
里添加一条 createImageAction
. 绑定枚举与菜单项名称.其中 1 ~ 3 比较正常, 完成一个新算法必不可少的两项: 配置参数与算法逻辑.
然而 4, 5, 6 在代码中会显得非常冗长. 每增加一项算法, 因为这三条的原因, 代码长度会增加 3 倍. 如果遇到后期要维护修改, 譬如更改枚举变量名称, 则需要对应着改三处.
由于后期的修改点, 几乎集中在这个流程中. 所以缩减 4 ~ 6 的步骤很有必要. 但无论如何, 创建对象少不了, 增加菜单少不了. 这两者的绑定也少不了.
除此之外, 其实还有一个隐藏的效率要求: 创建对象的过程应该是"动态"的, 即, 只有在点击菜单项的那一刻, 才创建.
最后, 还有一个新需求需要考虑: 不仅需要菜单项, 还需要相对应的工具栏上的工具按钮, 所以还需要多指定一个 icon 名称.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.