scijs / contributing

Contribution guide lines
10 stars 0 forks source link

Image processing #26

Open rikkertkoppes opened 8 years ago

rikkertkoppes commented 8 years ago

I am interested in lots of image processing algorithms. For start, operations around dilation and erosion: http://scikit-image.org/docs/dev/api/skimage.morphology.html

I am happy to contribute code. Are there any guidelines to follow? I can for example see the benefit of following scikit or matlab naming and packaging conventions.

I did note #19 but more generally, do you follow an established set?

jaspervdg commented 8 years ago

Here is a checklist of various things that I use (based on a discussion with Mikola) in "polishing" a package:

version >= 1.0.0
dependencies also have version >= 1
all dependencies using caret ^
issue url, repository url, keywords(?)
  "bugs": {
    "url": "https://github.com/scijs/PROJECT/issues"
  }
license (MIT)
author list up-to-date
scijs keyword
cwise dependency as browserify transform
  "browserify": {
    "transform": ["cwise"]
  },

check readme (Intro/Example, Install, API, License)
----------
Install using [npm](https://www.npmjs.com/):

    npm install
----------
remove stability badges
test cases
tape (not tap) for tests in package.json, and internally
tape version >= 4.0.0

(set up travis)
travisify
travisify badge

npm publish

Concerning the format of the README, it is probably best to check some recent examples (the same thing goes for writing test cases, and to get a decent idea of code conventions). In general, keep modules small and focussed.

As for dilations and erosions, I am a little ashamed to say that we indeed do not have any morphological operations yet (except for morphological pyramids), so they would be most welcome. I do have some code in a project that pre-dated scijs though, so perhaps you can use it to bootstrap your effort (do not consider the structure of this project as a good example, but the code is in the node_modules directory): http://www.cs.rug.nl/svcg/People/JasperVanDeGronde-FrameMorphologyDemo The nice thing about this code is that the time complexity does not depend on the structuring element size, but it only supports square structuring elements. If you would like to implement an efficient method for arbitrary SEs you might consider looking at this work: http://www.cs.rug.nl/~michael/tip2dsefpage.html http://www.cs.rug.nl/~michael/UWmorphops.zip And if you're feeling adventurous, the following project contains (pre-scijs) code for morphological operations with rotated squares: http://www.cs.rug.nl/svcg/People/JasperVanDeGronde-UnatFuIks3

rreusser commented 8 years ago

@jaspervdg Should I add that to a CONTRIBUTING.md sort of document somewhere? Or maybe a scijs-contributing repo so that it can make its way onto the scijs.net/packages site?

jaspervdg commented 8 years ago

That would be great!

rreusser commented 8 years ago

@jaspervdg Long delay and this is way overdue, but I started building out a style guide. See: https://github.com/scijs/contributing/wiki/Style-Guide

The idea is that can flesh it out there and then move it to scijs/contributing/README.md. Step 1 = write the style guide. Step 2 = a big cleanup sweep through scijs, using best judgment to decide which packages can simply be cleaned up to conform and which are fine the way they are.

Feedback welcome! Feel free to discuss under #27 or to add items, notes, concerns, caveats, better ideas to the wiki page directly.