@@ -13,7 +13,7 @@ processing.
13
13
14
14
The main functions provided by this package are:
15
15
16
- | Function | Action |
16
+ | Function | Action |
17
17
| :-------------------------| :---------------|
18
18
| [ ` imfilter ` ] ( @ref ) | Filter a one, two or multidimensional array img with a kernel by computing their correlation |
19
19
| [ ` imfilter! ` ] ( @ref ) | Filter an array img with kernel kernel by computing their correlation, storing the result in imgfilt |
@@ -25,7 +25,7 @@ The main functions provided by this package are:
25
25
| [ ` findlocalminima ` ] ( @ref ) | Returns the coordinates of elements whose value is smaller than all of their immediate neighbors |
26
26
| [ ` findlocalmaxima ` ] ( @ref ) | Returns the coordinates of elements whose value is larger than all of their immediate neighbors |
27
27
28
- Common kernels (filters) are organized in the ` Kernel ` and ` KernelFactors ` modules.
28
+ Common kernels (filters) are organized in the ` Kernel ` and ` KernelFactors ` modules.
29
29
30
30
A common task in image processing and computer vision is computing
31
31
image * gradients* (derivatives), for which there is the dedicated
@@ -80,6 +80,24 @@ transform (FFT). By default, this choice is made based on kernel
80
80
size. You can manually specify the algorithm using [ ` Algorithm.FFT() ` ] ( @ref )
81
81
or [ ` Algorithm.FIR() ` ] ( @ref ) .
82
82
83
+ #### Reusing FFT plans
84
+
85
+ It is possible to reuse FFT plans if the operation is going to be done on the
86
+ same array type and dimensions i.e. on each image of an image stack
87
+
88
+ ``` julia
89
+ using ImageFiltering, ComputationalResources
90
+ imgstack = rand (Float64, 200 , 100 , 10 )
91
+ imgstack_filtered = similar (imgstack)
92
+
93
+ kernel = ImageFiltering. factorkernel (Kernel. LoG (1 ))
94
+ fft_planned = CPU1 (ImageFiltering. planned_fft (imgstack_filtered[:,:,1 ], kernel))
95
+
96
+ for i in axes (imgstack, 3 )
97
+ imfilter! (fft_planned, imgstack_filtered[:,:,i], imgstack[:,:,i], kernel)
98
+ end
99
+ ```
100
+
83
101
### Feature: Multithreading
84
102
85
103
If you launch Julia with ` JULIA_NUM_THREADS=n ` (where ` n > 1 ` ), then
0 commit comments