Browse Source

Add of stride parameter for convolution2D

Jérôme BUISINE 9 months ago
parent
commit
5350ee3269
42 changed files with 84 additions and 81 deletions
  1. BIN
      docs/build/doctrees/environment.pickle
  2. BIN
      docs/build/doctrees/ipfml/ipfml.filters.convolution.doctree
  3. 1 1
      docs/build/html/.buildinfo
  4. 2 2
      docs/build/html/_modules/index.html
  5. 2 2
      docs/build/html/_modules/ipfml/exceptions.html
  6. 7 5
      docs/build/html/_modules/ipfml/filters/convolution.html
  7. 2 2
      docs/build/html/_modules/ipfml/filters/kernels.html
  8. 2 2
      docs/build/html/_modules/ipfml/filters/noise.html
  9. 2 2
      docs/build/html/_modules/ipfml/iqa/fr.html
  10. 2 2
      docs/build/html/_modules/ipfml/metrics.html
  11. 2 2
      docs/build/html/_modules/ipfml/processing/compression.html
  12. 2 2
      docs/build/html/_modules/ipfml/processing/movement.html
  13. 2 2
      docs/build/html/_modules/ipfml/processing/reconstruction.html
  14. 2 2
      docs/build/html/_modules/ipfml/processing/segmentation.html
  15. 2 2
      docs/build/html/_modules/ipfml/processing/transform.html
  16. 2 2
      docs/build/html/_modules/ipfml/utils.html
  17. 1 1
      docs/build/html/_static/documentation_options.js
  18. 2 2
      docs/build/html/contributing.html
  19. 2 2
      docs/build/html/description.html
  20. 2 2
      docs/build/html/examples.html
  21. 2 2
      docs/build/html/genindex.html
  22. 2 2
      docs/build/html/index.html
  23. 2 2
      docs/build/html/ipfml.html
  24. 2 2
      docs/build/html/ipfml/ipfml.exceptions.html
  25. 4 4
      docs/build/html/ipfml/ipfml.filters.convolution.html
  26. 2 2
      docs/build/html/ipfml/ipfml.filters.kernels.html
  27. 2 2
      docs/build/html/ipfml/ipfml.filters.noise.html
  28. 2 2
      docs/build/html/ipfml/ipfml.iqa.fr.html
  29. 2 2
      docs/build/html/ipfml/ipfml.metrics.html
  30. 2 2
      docs/build/html/ipfml/ipfml.processing.compression.html
  31. 2 2
      docs/build/html/ipfml/ipfml.processing.movement.html
  32. 2 2
      docs/build/html/ipfml/ipfml.processing.reconstruction.html
  33. 2 2
      docs/build/html/ipfml/ipfml.processing.segmentation.html
  34. 2 2
      docs/build/html/ipfml/ipfml.processing.transform.html
  35. 2 2
      docs/build/html/ipfml/ipfml.utils.html
  36. BIN
      docs/build/html/objects.inv
  37. 2 2
      docs/build/html/py-modindex.html
  38. 2 2
      docs/build/html/search.html
  39. 1 1
      docs/build/html/searchindex.js
  40. 2 2
      docs/source/conf.py
  41. 5 3
      ipfml/filters/convolution.py
  42. 1 2
      setup.py

BIN
docs/build/doctrees/environment.pickle


BIN
docs/build/doctrees/ipfml/ipfml.filters.convolution.doctree


+ 1 - 1
docs/build/html/.buildinfo

@@ -1,4 +1,4 @@
 # Sphinx build info version 1
 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 9a792b9eb44bdcf4b91ffb436b8dcc12
+config: f94e7f98975557cb5cee7a3b8a3defb7
 tags: 645f666f9bcd5a90fca523b33c5a78b7

+ 2 - 2
docs/build/html/_modules/index.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Overview: module code &mdash; ipfml v0.4.7 documentation</title>
+  <title>Overview: module code &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/exceptions.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.exceptions &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.exceptions &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

File diff suppressed because it is too large
+ 7 - 5
docs/build/html/_modules/ipfml/filters/convolution.html


+ 2 - 2
docs/build/html/_modules/ipfml/filters/kernels.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.kernels &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.filters.kernels &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/filters/noise.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.noise &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.filters.noise &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/iqa/fr.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.iqa.fr &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.iqa.fr &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/metrics.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.metrics &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.metrics &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/compression.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.compression &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.compression &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/movement.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.movement &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.movement &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/reconstruction.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.reconstruction &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.reconstruction &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/segmentation.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.segmentation &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.segmentation &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/transform.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.transform &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.transform &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/utils.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.utils &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.utils &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 1 - 1
docs/build/html/_static/documentation_options.js

@@ -1,6 +1,6 @@
 var DOCUMENTATION_OPTIONS = {
     URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
-    VERSION: 'v0.4.7',
+    VERSION: 'v0.4.8',
     LANGUAGE: 'None',
     COLLAPSE_INDEX: false,
     FILE_SUFFIX: '.html',

+ 2 - 2
docs/build/html/contributing.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Contributing &mdash; ipfml v0.4.7 documentation</title>
+  <title>Contributing &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -57,7 +57,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/description.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Description &mdash; ipfml v0.4.7 documentation</title>
+  <title>Description &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/examples.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Examples &mdash; ipfml v0.4.7 documentation</title>
+  <title>Examples &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/genindex.html

@@ -9,7 +9,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Index &mdash; ipfml v0.4.7 documentation</title>
+  <title>Index &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -57,7 +57,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/index.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Image Processing For Machine Learning &mdash; ipfml v0.4.7 documentation</title>
+  <title>Image Processing For Machine Learning &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -57,7 +57,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Documentation &mdash; ipfml v0.4.7 documentation</title>
+  <title>Documentation &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.exceptions.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.exceptions &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.exceptions &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

File diff suppressed because it is too large
+ 4 - 4
docs/build/html/ipfml/ipfml.filters.convolution.html


+ 2 - 2
docs/build/html/ipfml/ipfml.filters.kernels.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.kernels &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.filters.kernels &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.filters.noise.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.noise &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.filters.noise &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.iqa.fr.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.iqa.fr &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.iqa.fr &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.metrics.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.metrics &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.metrics &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.compression.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.compression &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.compression &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.movement.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.movement &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.movement &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.reconstruction.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.reconstruction &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.reconstruction &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.segmentation.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.segmentation &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.segmentation &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.transform.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.transform &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.processing.transform &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.utils.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.utils &mdash; ipfml v0.4.7 documentation</title>
+  <title>ipfml.utils &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

BIN
docs/build/html/objects.inv


+ 2 - 2
docs/build/html/py-modindex.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Python Module Index &mdash; ipfml v0.4.7 documentation</title>
+  <title>Python Module Index &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -59,7 +59,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

+ 2 - 2
docs/build/html/search.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Search &mdash; ipfml v0.4.7 documentation</title>
+  <title>Search &mdash; ipfml v0.4.8 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.7
+                0.4.8
               </div>
             
           

File diff suppressed because it is too large
+ 1 - 1
docs/build/html/searchindex.js


+ 2 - 2
docs/source/conf.py

@@ -24,9 +24,9 @@ copyright = '2019, Jérôme BUISINE'
 author = 'Jérôme BUISINE'
 
 # The short X.Y version
-version = '0.4.7'
+version = '0.4.8'
 # The full version, including alpha/beta/rc tags
-release = 'v0.4.7'
+release = 'v0.4.8'
 
 
 # -- General configuration ---------------------------------------------------

+ 5 - 3
ipfml/filters/convolution.py

@@ -6,7 +6,7 @@ Convolution functions to apply on images
 import numpy as np
 
 
-def convolution2D(image, kernel, kernel_size=(5, 5)):
+def convolution2D(image, kernel, kernel_size=(5, 5), stride=1):
     """Apply 2D convolution on image using specific kernel from `ipfml.filters.kernels`
 
     Args:
@@ -43,13 +43,15 @@ def convolution2D(image, kernel, kernel_size=(5, 5)):
     img_diff = []
     for i in range(width):
 
-        if i >= padding_width and i < (width - padding_width):
+        if i >= padding_width and i < (
+                width - padding_width) and i % stride == 0:
 
             row_diff = []
 
             for j in range(height):
 
-                if j >= padding_height and j < (height - padding_height):
+                if j >= padding_height and j < (
+                        height - padding_height) and j % stride == 0:
 
                     # pixel in the center of kernel window size, need to extract window from img
                     window = img[int(i - padding_width):int(i + padding_width +

+ 1 - 2
setup.py

@@ -63,7 +63,7 @@ class BuildTestCommand(setuptools.command.build_py.build_py):
 
 setup(
     name='ipfml',
-    version='0.4.7',
+    version='0.4.8',
     description='Image Processing For Machine Learning',
     long_description=readme(),
     classifiers=[
@@ -84,7 +84,6 @@ setup(
         'scikit-image',
         'scipy',
         'opencv-python',
-        'scipy',
     ],
     cmdclass={
         'build_py': BuildTestCommand,