Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imfilter_inseparable does not respect Images #133

Closed
kmsquire opened this issue Jul 26, 2014 · 2 comments
Closed

imfilter_inseparable does not respect Images #133

kmsquire opened this issue Jul 26, 2014 · 2 comments

Comments

@kmsquire
Copy link
Collaborator

If s1 is a separable filter and cb2 is a grayscale image, imfilter returns an Image

julia> cb2
Gray Image with:
  data: 1024x1024 Array{Uint8,2}
  properties:
    colorspace: Gray
    spatialorder:  x y

julia> s1
3x3 Array{Float64,2}:
 -0.112737  0.0  0.112737
 -0.274526  0.0  0.274526
 -0.112737  0.0  0.112737

julia> imfilter(cb2, s1)
Gray Image with:
  data: 1024x1024 Array{Float64,2}
  properties:
    colorspace: Gray
    spatialorder:  x y

However, if for inseparable filters, it returns an Array instead:

julia> s1
4x4 Array{Float64,2}:
 -0.022116  -0.025526  0.025526  0.022116
 -0.098381  -0.112984  0.112984  0.098381
 -0.098381  -0.112984  0.112984  0.098381
 -0.022116  -0.025526  0.025526  0.022116

julia> imfilter(cb2, s1)
1024x1024 Array{Float64,2}:
 0.0  0.0  0.0  0.0    0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0     0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0     0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0     0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0     0.0  0.0  0.0  0.0
                                       
 0.0  0.0  0.0  0.0     0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0    0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0     0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0     0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0     0.0  0.0  0.0  0.0
@timholy
Copy link
Member

timholy commented Jul 26, 2014

Good catch, sorry about that.

@kmsquire
Copy link
Collaborator Author

No problem, thanks!

On Saturday, July 26, 2014, Tim Holy notifications@github.com wrote:

Good catch, sorry about that.


Reply to this email directly or view it on GitHub
#133 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants