This is a PR that proposes a large reorganisation of the chapter 12. The initial goal was just to better explain the role of Numpy but as information was scattered in different places, I couldn't come up with incremental changes. The general goal is to give more coherence to this chapter and in particular clarify the different roles that Numpy has. Generally the content is the same as before but I added sometimes explanations of some concepts that were shown but not explained (e.g. the equivalence of np.max(myarray) and myarray.max()).
The general structure is now:
chapter 1: we can't use list to do computations and need Numpy arrays instead. We can create different such arrays.
chapter 2: In most cases we want to open images as arrays. How to open images and visualize them.
chapter 3: what type of image processing operations can we do? Simply calculus, combining images and computing stats.
chapter 4: considering only parts of images: cropping
chapter 5: selecting interesting pixels (indexing or masking)
chapter 6: often images have more than one channel: how to deal with more than two dimensions and how to visualize them
Some more detailed notes:
Visualization. Of course I'm biased here, but I mostly used microfilm to do the plotting in all notebooks. I don't think that skimage.io.imshow is a good solution because it is limited, not widely used, and will probably be deprecated at some point. The other choice is plain matplotlib but it has its own limitations.
Masking. I moved the chapter that was in the Python intro here. I added a part on how to use masking for images. I tend to avoid the term masking in favour of indexing as masking has a different meaning in Numpy.
Explanations. As mentioned above, in several places I explained in text concepts that were just shown in code. I don't know if that's ok or not. It's my impression that some people (will) use this resources as is (without a live lecture), so I think it's useful.
Image imports. I replaced paths with urls to Github. This ensures that code always works (e.g. on Colab) but maybe that's not a welcome change. In that case, in the "Setting up your computer" explanation there should be an explanation on how to download the repo.
More changes. With all changes, there will certainly be some adjustments to make. For example some exercises might be missing or out of sync. If we agree on some changes, I'll do a second pass.
Let me know what you think about all these changes and I can adjust the PR (or make a clean one) if we agree one some of them.
Just one last question: is there some logic to the weird numbering of chapters? Are there some planned but missing parts?
Hi Robert @haesleinhuepf,
This is a PR that proposes a large reorganisation of the chapter 12. The initial goal was just to better explain the role of Numpy but as information was scattered in different places, I couldn't come up with incremental changes. The general goal is to give more coherence to this chapter and in particular clarify the different roles that Numpy has. Generally the content is the same as before but I added sometimes explanations of some concepts that were shown but not explained (e.g. the equivalence of
np.max(myarray)
andmyarray.max()
).The general structure is now:
Some more detailed notes:
microfilm
to do the plotting in all notebooks. I don't think thatskimage.io.imshow
is a good solution because it is limited, not widely used, and will probably be deprecated at some point. The other choice is plain matplotlib but it has its own limitations.Let me know what you think about all these changes and I can adjust the PR (or make a clean one) if we agree one some of them.
Just one last question: is there some logic to the weird numbering of chapters? Are there some planned but missing parts?
Cheers, Guillaume