Skip to content

Commit 6aeb737

Browse files
committed
Generate Pelican site
1 parent 2db5473 commit 6aeb737

File tree

135 files changed

+2317
-3633
lines changed
  • 101-analyzing-the-frequency-components-of-a-signal-with-a-fast-fourier-transform
  • 102-applying-a-linear-filter-to-a-digital-signal
  • 103-computing-the-autocorrelation-of-a-time-series
  • 11-introducing-ipython-and-the-jupyter-notebook
  • 111-manipulating-the-exposure-of-an-image
  • 112-applying-filters-on-an-image
  • 113-segmenting-an-image
  • 114-finding-points-of-interest-in-an-image
  • 115-detecting-faces-in-an-image-with-opencv
  • 116-applying-digital-filters-to-speech-sounds
  • 117-creating-a-sound-synthesizer-in-the-notebook
  • 12-getting-started-with-exploratory-data-analysis-in-the-jupyter-notebook
  • 121-plotting-the-bifurcation-diagram-of-a-chaotic-dynamical-system
  • 122-simulating-an-elementary-cellular-automaton
  • 123-simulating-an-ordinary-differential-equation-with-scipy
  • 124-simulating-a-partial-differential-equation-reaction-diffusion-systems-and-turing-patterns
  • 13-introducing-the-multidimensional-array-in-numpy-for-fast-array-computations
  • 131-simulating-a-discrete-time-markov-chain
  • 132-simulating-a-poisson-process
  • 133-simulating-a-brownian-motion
  • 134-simulating-a-stochastic-differential-equation
  • 14-creating-an-ipython-extension-with-custom-magic-commands
  • 141-manipulating-and-visualizing-graphs-with-networkx
  • 142-drawing-flight-routes-with-networkx
  • 143-resolving-dependencies-in-a-directed-acyclic-graph-with-a-topological-sort
  • 144-computing-connected-components-in-an-image
  • 145-computing-the-voronoi-diagram-of-a-set-of-points
  • 146-manipulating-geospatial-data-with-cartopy
  • 147-creating-a-route-planner-for-a-road-network
  • 15-mastering-ipythons-configuration-system
  • 151-diving-into-symbolic-computing-with-sympy
  • 152-solving-equations-and-inequalities
  • 153-analyzing-real-valued-functions
  • 154-computing-exact-probabilities-and-manipulating-random-variables
  • 155-a-bit-of-number-theory-with-sympy
  • 156-finding-a-boolean-propositional-formula-from-a-truth-table
  • 157-analyzing-a-nonlinear-differential-system-lotka-volterra-predator-prey-equations
  • 158-getting-started-with-sage
  • 16-creating-a-simple-kernel-for-jupyter
  • 21-learning-the-basics-of-the-unix-shell
  • 22-using-the-latest-features-of-python-3
  • 23-learning-the-basics-of-the-distributed-version-control-system-git
  • 24-a-typical-workflow-with-git-branching
  • 25-efficient-interactive-computing-workflows-with-ipython
  • 26-ten-tips-for-conducting-reproducible-interactive-computing-experiments
  • 27-writing-high-quality-python-code
  • 28-writing-unit-tests-with-pytest
  • 29-debugging-code-with-ipython
  • 31-teaching-programming-in-the-notebook-with-ipython-blocks
  • 32-converting-a-jupyter-notebook-to-other-formats-with-nbconvert
  • 33-mastering-widgets-in-the-jupyter-notebook
  • 34-creating-custom-jupyter-notebook-widgets-in-python-html-and-javascript
  • 35-configuring-the-jupyter-notebook
  • 36-introducing-jupyterlab
  • 41-evaluating-the-time-taken-by-a-command-in-ipython
  • 42-profiling-your-code-easily-with-cprofile-and-ipython
  • 43-profiling-your-code-line-by-line-with-line_profiler
  • 44-profiling-the-memory-usage-of-your-code-with-memory_profiler
  • 45-understanding-the-internals-of-numpy-to-avoid-unnecessary-array-copying
  • 46-using-stride-tricks-with-numpy
  • 47-implementing-an-efficient-rolling-average-algorithm-with-stride-tricks
  • 48-processing-large-numpy-arrays-with-memory-mapping
  • 49-manipulating-large-arrays-with-hdf5
  • 51-knowing-python-to-write-faster-code
  • 510-interacting-with-asynchronous-parallel-tasks-in-ipython
  • 511-performing-out-of-core-computations-on-large-arrays-with-dask
  • 512-trying-the-julia-programming-language-in-the-jupyter-notebook
  • 52-accelerating-pure-python-code-with-numba-and-just-in-time-compilation
  • 53-accelerating-array-computations-with-numexpr
  • 54-wrapping-a-c-library-in-python-with-ctypes
  • 55-accelerating-python-code-with-cython
  • 56-optimizing-cython-code-by-writing-less-python-and-more-c
  • 57-releasing-the-gil-to-take-advantage-of-multi-core-processors-with-cython-and-openmp
  • 58-writing-massively-parallel-code-for-nvidia-graphics-cards-gpus-with-cuda
  • 59-distributing-python-code-across-multiple-cores-with-ipython
  • 61-using-matplotlib-styles
  • 62-creating-statistical-plots-easily-with-seaborn
  • 63-creating-interactive-web-visualizations-with-bokeh-and-holoviews
  • 64-visualizing-a-networkx-graph-in-the-notebook-with-d3js
  • 65-discovering-interactive-visualization-libraries-in-the-notebook
  • 66-creating-plots-with-altair-and-the-vega-lite-specification
  • 71-exploring-a-dataset-with-pandas-and-matplotlib
  • 72-getting-started-with-statistical-hypothesis-testing-a-simple-z-test
  • 73-getting-started-with-bayesian-methods
  • 74-estimating-the-correlation-between-two-variables-with-a-contingency-table-and-a-chi-squared-test
  • 75-fitting-a-probability-distribution-to-data-with-the-maximum-likelihood-method
  • 76-estimating-a-probability-distribution-nonparametrically-with-a-kernel-density-estimation
  • 77-fitting-a-bayesian-model-by-sampling-from-a-posterior-distribution-with-a-markov-chain-monte-carlo-method
  • 78-analyzing-data-with-the-r-programming-language-in-the-jupyter-notebook
  • 81-getting-started-with-scikit-learn
  • 82-predicting-who-will-survive-on-the-titanic-with-logistic-regression
  • 83-learning-to-recognize-handwritten-digits-with-a-k-nearest-neighbors-classifier
  • 84-learning-from-text-naive-bayes-for-natural-language-processing
  • 85-using-support-vector-machines-for-classification-tasks
  • 86-using-a-random-forest-to-select-important-features-for-regression
  • 87-reducing-the-dimensionality-of-a-dataset-with-a-principal-component-analysis
  • 88-detecting-hidden-structures-in-a-dataset-with-clustering
  • 91-finding-the-root-of-a-mathematical-function
  • 92-minimizing-a-mathematical-function
  • 93-fitting-a-function-to-data-with-nonlinear-least-squares
  • 94-finding-the-equilibrium-state-of-a-physical-system-by-minimizing-its-potential-energy
  • chapter-1-a-tour-of-interactive-computing-with-jupyter-and-ipython
  • chapter-10-signal-processing
  • chapter-11-image-and-audio-processing
  • chapter-12-deterministic-dynamical-systems
  • chapter-13-stochastic-dynamical-systems
  • chapter-14-graphs-geometry-and-geographic-information-systems
  • chapter-15-symbolic-and-numerical-mathematics
  • chapter-2-best-practices-in-interactive-computing
  • chapter-3-mastering-the-jupyter-notebook
  • chapter-4-profiling-and-optimization
  • chapter-5-high-performance-computing
  • chapter-6-data-visualization
  • chapter-7-statistical-data-analysis
  • chapter-8-machine-learning
  • chapter-9-numerical-optimization
  • cookbook
  • feeds
  • minibook
  • pages

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+2317
-3633
lines changed

101-analyzing-the-frequency-components-of-a-signal-with-a-fast-fourier-transform/index.html

+25-42
Large diffs are not rendered by default.

102-applying-a-linear-filter-to-a-digital-signal/index.html

+18-28
Large diffs are not rendered by default.

103-computing-the-autocorrelation-of-a-time-series/index.html

+23-38
Large diffs are not rendered by default.

11-introducing-ipython-and-the-jupyter-notebook/index.html

+29-50
Large diffs are not rendered by default.

111-manipulating-the-exposure-of-an-image/index.html

+15-22
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@
3232
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
3333
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.3.0/pure-min.css">
3434
<!--[if lte IE 8]>
35-
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/grids-responsive-old-ie-min.css">
35+
<link rel="stylesheet" href="https://yui.yahooapis.com/pure/0.5.0/grids-responsive-old-ie-min.css">
3636
<![endif]-->
3737
<!--[if gt IE 8]><!-->
38-
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/grids-responsive-min.css">
38+
<link rel="stylesheet" href="https://yui.yahooapis.com/pure/0.5.0/grids-responsive-min.css">
3939
<!--<![endif]-->
4040
<link rel="stylesheet" href="http://ipython-books.github.io/theme/css/styles.css">
4141
<link rel="stylesheet" href="http://ipython-books.github.io/theme/css/pygments.css">
42-
<!-- <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'> -->
43-
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,500" rel="stylesheet" type="text/css">
44-
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono' rel='stylesheet' type='text/css'>
42+
<!-- <link href='https://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'> -->
43+
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,500" rel="stylesheet" type="text/css">
44+
<link href='https://fonts.googleapis.com/css?family=Ubuntu+Mono' rel='stylesheet' type='text/css'>
4545

4646

4747
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
@@ -95,24 +95,22 @@ <h2>Getting ready</h2>
9595
<p>scikit-image should be included by default in Anaconda. Otherwise, you can always install it manually with <code>conda install scikit-image</code>.</p>
9696
<h2>How to do it...</h2>
9797
<p><strong>1.&nbsp;</strong> Let's import the packages:</p>
98-
<div class="highlight highlight-python"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
98+
<div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
9999
<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="kn">as</span> <span class="nn">plt</span>
100100
<span class="kn">import</span> <span class="nn">skimage.exposure</span> <span class="kn">as</span> <span class="nn">skie</span>
101101
<span class="o">%</span><span class="n">matplotlib</span> <span class="n">inline</span>
102102
</pre></div>
103-
</div>
104103

105104

106105
<p><strong>2.&nbsp;</strong> We open an image with matplotlib. We only take a single RGB component to have a grayscale image (it is a very crude way of doing it, we give much better ways at the end of this recipe):</p>
107-
<div class="highlight highlight-python"><div class="highlight"><pre><span></span><span class="n">img</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">imread</span><span class="p">(</span><span class="s1">&#39;https://github.com/ipython-books/&#39;</span>
106+
<div class="highlight"><pre><span></span><span class="n">img</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">imread</span><span class="p">(</span><span class="s1">&#39;https://github.com/ipython-books/&#39;</span>
108107
<span class="s1">&#39;cookbook-2nd-data/blob/master/&#39;</span>
109108
<span class="s1">&#39;beach.png?raw=true&#39;</span><span class="p">)[</span><span class="o">...</span><span class="p">,</span> <span class="mi">0</span><span class="p">]</span>
110109
</pre></div>
111-
</div>
112110

113111

114112
<p><strong>3.&nbsp;</strong> We create a function that displays the image along with its <strong>histogram</strong> of the intensity values (that is, the exposure):</p>
115-
<div class="highlight highlight-python"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">show</span><span class="p">(</span><span class="n">img</span><span class="p">):</span>
113+
<div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">show</span><span class="p">(</span><span class="n">img</span><span class="p">):</span>
116114
<span class="c1"># Display the image.</span>
117115
<span class="n">fig</span><span class="p">,</span> <span class="p">(</span><span class="n">ax1</span><span class="p">,</span> <span class="n">ax2</span><span class="p">)</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span>
118116
<span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
@@ -127,30 +125,26 @@ <h2>How to do it...</h2>
127125

128126
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
129127
</pre></div>
130-
</div>
131128

132129

133130
<p><strong>4.&nbsp;</strong> Let's display the image along with its histogram:</p>
134-
<div class="highlight highlight-python"><div class="highlight"><pre><span></span><span class="n">show</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
131+
<div class="highlight"><pre><span></span><span class="n">show</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
135132
</pre></div>
136-
</div>
137133

138134

139135
<p><img alt="&lt;matplotlib.figure.Figure at 0x7795080&gt;" src="http://ipython-books.github.io/pages/chapter11_image/01_exposure_files/01_exposure_12_0.png" /></p>
140136
<p>The histogram is unbalanced and the image appears overexposed (many pixels are too bright).</p>
141137
<p><strong>5.&nbsp;</strong> Now, we rescale the intensity of the image using scikit-image's <code>rescale_intensity</code> function. The <code>in_range</code> and <code>out_range</code> parameters define a linear mapping from the original image to the modified image. The pixels that are outside <code>in_range</code> are clipped to the extremal values of <code>out_range</code>. Here, the darkest pixels (intensity less than 100) become completely black (0), whereas the brightest pixels (&gt;240) become completely white (255):</p>
142-
<div class="highlight highlight-python"><div class="highlight"><pre><span></span><span class="n">show</span><span class="p">(</span><span class="n">skie</span><span class="o">.</span><span class="n">rescale_intensity</span><span class="p">(</span>
138+
<div class="highlight"><pre><span></span><span class="n">show</span><span class="p">(</span><span class="n">skie</span><span class="o">.</span><span class="n">rescale_intensity</span><span class="p">(</span>
143139
<span class="n">img</span><span class="p">,</span> <span class="n">in_range</span><span class="o">=</span><span class="p">(</span><span class="mf">0.4</span><span class="p">,</span> <span class="o">.</span><span class="mi">95</span><span class="p">),</span> <span class="n">out_range</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)))</span>
144140
</pre></div>
145-
</div>
146141

147142

148143
<p><img alt="A crude exposure manipulation technique" src="http://ipython-books.github.io/pages/chapter11_image/01_exposure_files/01_exposure_15_0.png" /></p>
149144
<p>Many intensity values seem to be missing in the histogram, which reflects the poor quality of this crude exposure correction technique.</p>
150145
<p><strong>6.&nbsp;</strong> We now use a more advanced exposure correction technique called <strong>Contrast Limited Adaptive Histogram Equalization (CLAHE)</strong>:</p>
151-
<div class="highlight highlight-python"><div class="highlight"><pre><span></span><span class="n">show</span><span class="p">(</span><span class="n">skie</span><span class="o">.</span><span class="n">equalize_adapthist</span><span class="p">(</span><span class="n">img</span><span class="p">))</span>
146+
<div class="highlight"><pre><span></span><span class="n">show</span><span class="p">(</span><span class="n">skie</span><span class="o">.</span><span class="n">equalize_adapthist</span><span class="p">(</span><span class="n">img</span><span class="p">))</span>
152147
</pre></div>
153-
</div>
154148

155149

156150
<p><img alt="&lt;matplotlib.figure.Figure at 0x7ade080&gt;" src="http://ipython-books.github.io/pages/chapter11_image/01_exposure_files/01_exposure_18_1.png" /></p>
@@ -182,9 +176,9 @@ <h2>See also</h2>
182176
<footer id="footer" class="pure-u-1 pure-u-md-4-4">
183177
<div class="l-box">
184178
<div>
185-
<p>&copy; <a href="http://cyrille.rossant.net">Cyrille Rossant</a> &ndash;
179+
<p>&copy; <a href="https://cyrille.rossant.net">Cyrille Rossant</a> &ndash;
186180
Built with <a href="https://github.com/PurePelicanTheme/pure-single">Pure Theme</a>
187-
for <a href="http://blog.getpelican.com/">Pelican</a>
181+
for <a href="https://blog.getpelican.com/">Pelican</a>
188182
</p>
189183
</div>
190184
</div>
@@ -204,11 +198,10 @@ <h2>See also</h2>
204198
src="https://www.statcounter.com/counter/counter.js"
205199
async></script>
206200
<noscript><div class="statcounter"><a title="Web Analytics"
207-
href="http://statcounter.com/" target="_blank"><img
201+
href="https://statcounter.com/" target="_blank"><img
208202
class="statcounter"
209203
src="//c.statcounter.com/9752080/0/c177b501/1/" alt="Web
210204
Analytics"></a></div></noscript>
211205
<!-- End of StatCounter Code for Default Guide -->
212206
</body>
213-
</html>
214-
207+
</html>

0 commit comments

Comments
 (0)