Errors: image.py: FEAT: Adding canny edge detector
nanophd opened this issue · comments
I don't know if the canny edge detector is fully implemented yet, but when trying to use it I get some errors:
def canny(image,
+ low_threshold, high_threshold = None,
+ treshold_type = CANNY_THRESHOLD.MANUAL,
+ sobel_window = 3, is_fast = False):
I believe treshold_type
should be threshold_type
Once that is corrected I get an error of:
"...arrayfire\image.py", line 1235, in canny
c_uint(sobel_window), c_bool(is_fast)))NameError: global name 'c_uint' is not defined
If assuming that c_unit
and c_bool
are supposed to be appended with the _t
to make it look like this:
safe_call(backend.get().af_canny(c_pointer(output.arr), threshold_type.value,
low_threshold, high_threshold and high_threshold.value or 0,
c_uint_t(sobel_window), c_bool_t(is_fast)))
and using the default sobel_window=3 I get the following error.
"...\arrayfire\image.py", line 1235, in canny
c_uint_t(sobel_window), c_bool_t(is_fast)))ArgumentError: argument 3: <type 'exceptions.TypeError'>: Don't know how to convert parameter 3
Hope this makes sense and thanks for adding this feature
Thanks for reporting this. This should now be fixed in both master and devel.