Comments (4)
I was looking for this explanation! That makes sense, thanks for sharing...
from evision.
Hi @Wigny, the reasons for using smallCamelCase
is documented here, https://github.com/cocoa-xu/evision/wiki/Reasons-for-using-smallCamelCase-for-function-names
from evision.
In the very beginning, I tried to follow the snake_case
convention in Elixir, but that would cause too many edge cases to deal with so that the converted function names are sane.
Meanwhile, using smallCamelCase
usually only changes the initial letter of the function name -- it will cause less trouble when searching other OpenCV code examples written in C++/Python because it's easier to search ignore case than mapping between snake_case
and camelCase
.
I can understand that some people think snake_case
should be used whenever possible, but, for me and for this project only, I honestly think that it is better to choose a way that can help more users, especially beginners, actually to use this library.
from evision.
No worries! :D
And just to add an example of the edge cases, in C++ we have cv::COLOR_BayerGR2RGBA
, and there could be at least 4 ways to map it to snake_case
color_bayer_gr_2_rgba
color_bayergr_2_rgba
color_bayergr2rgba
color__bayer_gr2_rgba
<=Macro.underscore("COLOR_BayerGR2RGBA")
It might be easy to choose any of these for this example, but applying the same processing for some other functions might make them hard to read because the converted snake_case
name might be strange or hard to read.
COLOR_BayerGR2RGBA
is one of the examples that I don't really feel quite comfortable with any of these transformations -- they just look weird or hard to read.
And there are a few dozen of them would require us to look ahead to know if and where to put the _
and how many consecutive letters should be transformed into lower cases.
from evision.
Related Issues (20)
- Documentation Enhancements
- Consider make available precompiled binaries with FFmpeg included HOT 3
- Error compiling on Elixir 1.15.0/OTP 26.0.1 on M1 Mac with EVISION_PREFER_PRECOMPILED=true HOT 6
- Not able to use Evision Library with Elixir 1.14.4-otp25 HOT 6
- Use asdf for macOS CI HOT 1
- [macOS] `@behaviour :wx_object does not exist` HOT 2
- Add precompiled binaries for NIF version 2.17 (OTP 26)
- Failed to parse ONNX model on FaceRecognizerSF
- Face recognition always answers that the two photos are of the same person.
- Proposal: To prevent the entire Erlang VM from crashing when Evision's NIF aborts HOT 3
- Split this repo into `evision_beam` and `evision` HOT 9
- Using manylinux2010 for x86_64 linux? HOT 5
- Has Evision.Backend been removed? HOT 8
- Update model zoo URL for OpenCV 4.8.0
- Compilation error on Mac M1 HOT 5
- `Evision.imread` gives confusing `{:error, "empty matrix"}` error when file is not found HOT 2
- Zoo smartcell fails face detection because Kino.Input.image changed its return structure HOT 4
- Inheritance with Evision.Features2D HOT 3
- Fail to `im_write` after divided by Nx HOT 2
- can't compile evision for ios HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evision.