cocoa-xu / evision

Evision: An OpenCV-Erlang/Elixir binding
https://evision.app
Apache License 2.0
322 stars 22 forks source link

Support `/AOS` (arithmetic op src) marks in OpenCV source code #253

Closed cocoa-xu closed 2 weeks ago

cocoa-xu commented 2 weeks ago

This should make evision's behaviour in line with OpenCV (C++ and Python).

For example, in Evision.add/2, the expected behaviour should be different when src1/src2 are single number and they are tuple/array.

add(src,X) where X is a number (or Nx.tensor(X)), it means add(src, {X,X,X,X})

while add(src,{X}) (or add(src, Nx.tensor([X]))) means add(src,{X,0,0,0}).