-
Notifications
You must be signed in to change notification settings - Fork 901
Open
Labels
Description
I was trying to use the dilate function and erode with all parameters.
I believe the iteration parameter type should be an integer type in DilateWithParams. Currently it's BorderType.
Lines 282 to 296 in a84799d
| func DilateWithParams(src Mat, dst *Mat, kernel Mat, anchor image.Point, iterations, borderType BorderType, borderValue color.RGBA) error { | |
| cAnchor := C.struct_Point{ | |
| x: C.int(anchor.X), | |
| y: C.int(anchor.Y), | |
| } | |
| bv := C.struct_Scalar{ | |
| val1: C.double(borderValue.B), | |
| val2: C.double(borderValue.G), | |
| val3: C.double(borderValue.R), | |
| val4: C.double(borderValue.A), | |
| } | |
| return OpenCVResult(C.DilateWithParams(src.p, dst.p, kernel.p, cAnchor, C.int(iterations), C.int(borderType), bv)) | |
| } |
and in ErodeWithParams borderType parameter should be "BorderType" instead of int.
Lines 344 to 351 in a84799d
| func ErodeWithParams(src Mat, dst *Mat, kernel Mat, anchor image.Point, iterations, borderType int) error { | |
| cAnchor := C.struct_Point{ | |
| x: C.int(anchor.X), | |
| y: C.int(anchor.Y), | |
| } | |
| return OpenCVResult(C.ErodeWithParams(src.p, dst.p, kernel.p, cAnchor, C.int(iterations), C.int(borderType))) | |
| } |
I am using the latest gocv version, v0.42.0.