Closed RyoWakabayashi closed 1 year ago
Hi @RyoWakabayashi, thanks for reporting this issue!
This should be fixed in #175.
After some investigation, I found that these commits caused this:
cfba80bbd591a59da72632d466d96fa799c209dc - OpenCV set defval
to ""
when defval == f"{a.tp}()"
, cfba80bb#R704-R706
a7e81732fc6893064da7a2229a1f2bf0dc0baa83 - where we changed to check the defval
passed to crepr
; this would set ArgInfo.has_default
to false
77f35f8c97d68aa068fcc5fd6af0603c9b1aff22 - where we only return true
if either ArgInfo.has_default
or ArgInfo.outputarg
is true.
In this issue, the optional keyword argument borderValue
is nil
, and the generated ArgInfo.has_default
value for it was false
, so evision_to_safe
returned a false
; therefore, not all preconditions were satisfied, so it returned an ArgumentError
{
Mat src;
Mat dst;
Mat M;
Size dsize;
int flags=INTER_LINEAR;
int borderMode=BORDER_CONSTANT;
Scalar borderValue;
// ArgInfo(name, outputarg, has_default)
if( num_kw_args >= 3 &&
evision_to_safe(env, evision_get_kw(env, erl_terms, "src"), src, ArgInfo("src", 0, 0)) &&
evision_to_safe(env, evision_get_kw(env, erl_terms, "dst"), dst, ArgInfo("dst", 1, 0)) &&
evision_to_safe(env, evision_get_kw(env, erl_terms, "m"), M, ArgInfo("M", 0, 0)) &&
evision_to_safe(env, evision_get_kw(env, erl_terms, "dsize"), dsize, ArgInfo("dsize", 0, 0)) &&
evision_to_safe(env, evision_get_kw(env, erl_terms, "flags"), flags, ArgInfo("flags", 0, 1)) &&
evision_to_safe(env, evision_get_kw(env, erl_terms, "borderMode"), borderMode, ArgInfo("borderMode", 0, 1)) &&
evision_to_safe(env, evision_get_kw(env, erl_terms, "borderValue"), borderValue, ArgInfo("borderValue", 0, 0)) )
{
...
Thank you!
warpAffine
does'nt work in Evision 0.1.27 It works in Evision 0.1.25Evision 0.1.27
Evision 0.1.25
I run livebook on Docker
https://hub.docker.com/layers/livebook/livebook/0.8.1/images/sha256-ade30a713e59f32cdb2d074a3b8e70a533206777a68bd2021f0152ace69926d7?context=explore