Closed tusqasi closed 1 year ago
@spec drawContours(Evision.Mat.maybe_mat_in(), list(Evision.Mat.maybe_mat_in()), integer(), {number()} | {number(), number()} | {number() | number() | number()} | {number(), number(), number(), number()}, [{atom(), term()},...] | nil) :: Evision.Mat.t() | {:error, String.t()} def drawContours(image, contours, contourIdx, color, opts) when (is_struct(image, Evision.Mat) or is_struct(image, Nx.Tensor)) and is_list(contours) and is_integer(contourIdx) and is_tuple(color) and (opts == nil or (is_list(opts) and is_tuple(hd(opts))))
Looking at the type of color {number(), number()} | {number() | number() | number()} | {number(), number(), number(), number()}
{number(), number()} | {number() | number() | number()} | {number(), number(), number(), number()}
And looking closer, the second one is {number() | number() | number()}, which probably doesn't make sense.
{number() | number() | number()}
I asked around in the elixir discord wether this was as dialyzer issue or something else.
It seems that it is wrong from here https://github.com/cocoa-xu/evision/blob/e697d9701a9a280855a305734457612323848c89/py_src/helper.py#L1089
Thank you nicd for finding this.
https://github.com/cocoa-xu/evision/pull/182
Hi @tusqasi thanks for report this issue! I'm still waiting for the CI, and once it's finished, I'll ship out a new version, v0.1.29.
Looking at the type of color
{number(), number()} | {number() | number() | number()} | {number(), number(), number(), number()}
And looking closer, the second one is
{number() | number() | number()}
, which probably doesn't make sense.I asked around in the elixir discord wether this was as dialyzer issue or something else.
It seems that it is wrong from here https://github.com/cocoa-xu/evision/blob/e697d9701a9a280855a305734457612323848c89/py_src/helper.py#L1089
Thank you nicd for finding this.