Hi There,
I want to perform image processing with julia using ArrayFire, basically i want to load an image and perform a couple of operations such as applying a bilateral filter and white balance using my GPU.
I installed julia and add Arrayfire to it but still i don’t understand how to convert an image into an AFArray format to perform the bilateral filter.
this is my code:
using ArrayFire
using TestImages, Images, ImageMagick, ImageView
img = testimage("cameraman")
img_a = AFArray(img)
but gives me the following error:
MethodError: no method matching af_type(::Type{Gray{Normed{UInt8,8}}})
Closest candidates are:
af_type(!Matched::Type{Float32}) at /home/latrobe/.julia/packages/ArrayFire/nkN6J/src/util.jl:137
af_type(!Matched::Type{Complex{Float32}}) at /home/latrobe/.julia/packages/ArrayFire/nkN6J/src/util.jl:138
af_type(!Matched::Type{Float64}) at /home/latrobe/.julia/packages/ArrayFire/nkN6J/src/util.jl:139
…
Stacktrace:
[1] convert_array(::Array{Gray{Normed{UInt8,8}},2}) at /home/latrobe/.julia/packages/ArrayFire/nkN6J/src/util.jl:205
[2] AFArray(::Array{Gray{Normed{UInt8,8}},2}) at /home/latrobe/.julia/packages/ArrayFire/nkN6J/src/array.jl:34
[3] top-level scope at In[12]:4
Please note that arrayfire is working in c and i added all the packages listed on the code already.
Can anyone give me an idea how to solve this issue?
Sorry if the question is too basic but i spend several hours to figure it out unsuccessfully.
thanks in advance.
Regards.