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

mapwindow functionality #42

Open
mkborregaard opened this issue Nov 2, 2017 · 13 comments
Open

mapwindow functionality #42

mkborregaard opened this issue Nov 2, 2017 · 13 comments

Comments

@mkborregaard
Copy link

The mapwindow functionality (which overlaps with RollingFunctions for the 1-D case) is a general and common Array operation outside the context of ImageFiltering. I wonder why it lives here? Might it be more accessible for general users in a package like RollingFunctions and then imported and extended here?

@timholy
Copy link
Member

timholy commented Nov 2, 2017

I could rename this package "Stencils.jl"?

(The point being that almost everything in this package is of general interest.)

@mkborregaard
Copy link
Author

OK :-)

@timholy
Copy link
Member

timholy commented Nov 2, 2017

Well, this is not the first time this has come up. Is it really just the name that gets in the way, or something else? EDIT: meaning, does "image processing" somehow convey some very arcane art that only a few people would be interested in, rather than "people who do stuff with arrays"?

@timholy timholy reopened this Nov 2, 2017
@timholy
Copy link
Member

timholy commented Nov 2, 2017

Or to ask another way: is RollingFunctions somehow more discoverable? This package predated RollingFunctions and is (as you noted) more general. I wonder if it's just a "search key" problem?

@mkborregaard
Copy link
Author

Yes I think it is mainly that - I thought of this as a specialized package for image analysis. Then I opened the docs and saw an operation on the Mandril image, looked at the fairly big REQUIRE file and thought "this is overkill for the simple moving average I want in my code". I think the existence of RollingFunctions also testifies to that, and I noticed that eg. GLVisualize and TimeSeries have also rolled their own moving_average/moving functions, so I thought that maybe having a shared common dependency for things like that would be better.

@kmsquire
Copy link
Contributor

kmsquire commented Nov 2, 2017

I do like the name Stensils.jl, although I'm wondering if that suggests excludes any functionality implied here...

@timholy
Copy link
Member

timholy commented Nov 3, 2017

See also https://github.com/emmt/LocalFilters.jl, which just got submitted for registration. It seems the name "Images" really does scare people away?

@timholy
Copy link
Member

timholy commented Nov 3, 2017

I guess the best option is to split out "ArrayFilters" and leave any color-specific stuff here?

@mkborregaard
Copy link
Author

mkborregaard commented Nov 6, 2017

I think the name "images" may scare people away. I for one get a little cautious because ImageMagick broke Homebrew broke Pkg.update for me for a year until we finally stopped relying on it in Plots (and the Images stack broke my Pkg completely once) – this is of course grossly unfair as today the Image packages don't use ImageMagick at all.

Anyway, I think that's a nice idea!

@Keno
Copy link

Keno commented Apr 11, 2018

Bump on this. I didn't think to look here for generic stencil array operations because of the image name.

@mkborregaard
Copy link
Author

Bump in 2021 :-)

@rafaqz
Copy link

rafaqz commented Feb 12, 2021

Adding to this, DynamicGrids.jl has a very fast mapwindow using generated functions and sliding SArray windows, so it loads data from only a single column of the parent array for each window. Often 1 cache line. It's faster for small kernel convolutions than DSP.jl - and I imagine much faster than mapwindow which if I recall uses a view into the parent array.

Currently it's written pretty specifically for our needs in DynamicGrids.jl, but moving these implementations to a shared base package would make sense.

@rafaqz
Copy link

rafaqz commented Feb 12, 2021

In reply to some of the earlier discussion - it is both the name ImageFiltering and the many image specific dependencies that scare people away. I've rewritten a lot of this code in DynamicGrids.jl - partly because using stencils multiple times in a simulation allows different optimisations, but also because of the dependencies and the name. I had already written half of it before I realized how much crossover there was - knowing very little about image processing.

Changing the name to Stencils.jl or ArrayFiltering.jl would hopefully also include reassement of the dependencies - ImageFiltering.jl could remain to keep any image-specific code, and Stencils.jl could have all the general methods.

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

5 participants