lucasb-eyer / pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.
MIT License
1.94k stars 413 forks source link

add grayscale image example #27

Closed DaveRichmond- closed 7 years ago

lucasb-eyer commented 7 years ago

Thank you!

I'll add a couple more comments and refer to it from the README in a follow-up commit sometime soon. This will be of great help for newcomers dealing with non-RGB images.

lucasb-eyer commented 7 years ago

I've gone over it and turned it into a tutorial because why not :) One thing you might want to be aware of is that you had a mixup of width and height at some places, and thus it would give strange results for rectangular images.

This is understandable, because in images (and the original DenseCRF library) the ordering is WH, while in numpy/matlab it's HW.

Have a look and thanks again for the great example :tada: