Skip to content

Commit 9f28959

Browse files
EscapedGibbonstropitek
authored andcommitted
docs: add warning sign what methods can interact with images or masks
1 parent af68804 commit 9f28959

File tree

13 files changed

+54
-2
lines changed

13 files changed

+54
-2
lines changed

docs/Features/Filters/Blur.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import BlurDemo from './blur.demo.tsx'
22

33
[Check options and parameters of blur method](https://image-js.github.io/image-js-typescript/classes/Image.html#blur 'link on github io')
44

5+
:::caution
6+
This method only works with images.
7+
:::
8+
59
Blur, also known as average blur or box blur, is a simple image processing technique used to reduce noise and smooth out images. It involves replacing the color value of a pixel with the average color value of its neighboring pixels within a specified window or kernel. This process effectively blurs the image and reduces high-frequency noise.
610

711
Box blur is particularly effective in reducing [salt-and-pepper](https://en.wikipedia.org/wiki/Salt-and-pepper_noise 'wikipedia link on salt and pepper noise') noise (random black and white pixels) and minor imperfections in an image. However, it also leads to loss of finer details, so the choice of [kernel](../../../Glossary.md#kernel) size is important.

docs/Features/Filters/Derivative.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import GradientDemo from './gradient.demo.tsx'
33

44
[Check options and parameters of derivative method](https://image-js.github.io/image-js-typescript/classes/Image.html#derivativeFilter 'link on github io')
55

6+
:::caution
7+
This method only works with images.
8+
:::
9+
610
Derivative filter is a special case of a gradient filter, therefore it uses gradient algorithm. However, the key difference are the kernels used in this very algorithm. In ImageJS there are three distinguished kernels: [Sobel](https://en.wikipedia.org/wiki/Sobel_operator 'wikipedia link on Sobel kernel'), [Scharr](https://en.wikipedia.org/wiki/Sobel_operator#Alternative_operators 'wikipedia link on Scharr operator') and [Prewitt](https://en.wikipedia.org/wiki/Prewitt_operator 'wikipedia link on Prewitt kernel').
711

812
<DerivativeDemo />

docs/Features/Filters/Gradient.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import GradientDemo from './gradient.demo.tsx'
66

77
[Check options and parameters of gradient method](https://image-js.github.io/image-js-typescript/functions/gradientFilter.html 'link on github.io')
88

9+
:::caution
10+
This method only works with images.
11+
:::
12+
913
Gradient filter or specifically[ a gradient-based edge detection filter](https://en.wikipedia.org/wiki/Graduated_neutral-density_filter 'Wikipedia link on gradient filter'), is an image processing technique used to highlight edges and boundaries within an image by emphasizing areas of rapid intensity change. The gradient filter operates by calculating the rate of change of pixel intensities across the image. When there's a rapid transition from one intensity level to another, [the convolution operation](../../../Glossary.md#convolution 'glossary link on convolution') captures this change as a high gradient magnitude value, indicating the presence of an edge. It's a fundamental step in various computer vision and image analysis tasks, such as edge detection, object recognition, and image segmentation.
1014

1115
<GradientDemo />

docs/Features/Filters/Median.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import MedianDemo from './median.demo.tsx'
22

33
[Check options and parameters of median method](https://image-js.github.io/image-js-typescript/classes/Image.html#medianFilter 'github.io link')
44

5+
:::caution
6+
This method only works with images.
7+
:::
8+
59
[A median filter](https://en.wikipedia.org/wiki/Median_filter 'wikipedia link on median filter') is a digital image processing technique used to reduce noise in an image by replacing each pixel's value with the median value of neighboring pixels. It's particularly effective at removing ["salt and pepper"](https://en.wikipedia.org/wiki/Salt-and-pepper_noise 'Wikipedia link on salt and pepper effect') noise.
610

711
<MedianDemo />

docs/Features/Filters/Pixelate.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import PixelateDemo from './pixelate.demo.tsx'
22

33
[Check options and parameters of pixelate method](https://image-js.github.io/image-js-typescript/classes/Image.html#pixelate 'github.io link')
44

5+
:::caution
6+
This method only works with images.
7+
:::
8+
59
[Pixelate filter](https://en.wikipedia.org/wiki/Pixelization 'Wikipedia link on pixelization concept') is a digital image processing technique used to reduce the level of detail in an image by replacing groups of pixels with a single, average color value. This creates a mosaic-like effect where the image appears to be composed of larger, blocky elements rather than fine details.
610

711
<PixelateDemo />

docs/Features/Filters/and.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
[Check options and parameters of and method](https://image-js.github.io/image-js-typescript/classes/Mask.html#and 'github.io link')
22

3+
:::caution
4+
This method only works with masks.
5+
:::
6+
37
`and` method performs a [logical conjunction](https://en.wikipedia.org/wiki/Logical_conjunction 'wikipedia link on logical conjunction') between bits of two masks.
48

59
It works like this:

docs/Features/Filters/gaussianBlur.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import GaussianBlurDemo from './gaussianBlur.demo.tsx'
66

77
[Check options and parameters of gaussian blur method](https://image-js.github.io/image-js-typescript/classes/Image.html#gaussianBlur 'link on github io')
88

9+
:::caution
10+
This method only works with images.
11+
:::
12+
913
[Gaussian blur](https://en.wikipedia.org/wiki/Gaussian_blur 'Wikipedia link on gaussian blur') is a widely used image processing technique that smooths an image by reducing high-frequency noise and fine details while preserving the overall structure and larger features. It's named after the [Gaussian function](https://en.wikipedia.org/wiki/Gaussian_function 'wikipedia link on Gaussian function'), which is a mathematical function that represents a bell-shaped curve. Gaussian blur is often applied to images before other processing steps like edge detection to improve their quality and reliability.
1014

1115
<GaussianBlurDemo />

docs/Features/Filters/grayscale.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import GrayDemo from './grayscale.demo.tsx'
22

33
[Check options and parameters of grayscale method](https://image-js.github.io/image-js-typescript/classes/Image.html#grey 'github.io link')
44

5+
:::caution
6+
This method only works with images.
7+
:::
8+
59
[A grayscale filter](https://en.wikipedia.org/wiki/Grayscale 'Wikipedia link on grayscale filter'), often called a black-and-white filter, is an image processing technique used to convert a colored image into a grayscale version. In a grayscale image, each pixel is represented by a single intensity value, typically ranging from 0 (black) to 255 (white), with various shades of gray in between. This process removes color information and retains only the brightness information of the image.
610

711
<GrayDemo />

docs/Features/Filters/or.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
[Check options and parameters of level method](https://image-js.github.io/image-js-typescript/classes/Image.html#level 'github.io link')
2+
3+
:::caution
4+
This method works only with masks
5+
:::
6+
17
`or` method performs a [logical disjunction](https://en.wikipedia.org/wiki/Logical_disjunction 'wikipedia link on logical disjunction') between bits of two masks.
28

39
It works like this:

docs/Features/Filters/subtract.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Method called `subtract` ,as the name suggests, takes another mask and makes a subtraction between each respective bit of the mask.
1+
[Check options and parameters of subtract method](https://image-js.github.io/image-js-typescript/classes/Mask.html#subtract 'github.io link')
2+
3+
Method called `subtract`, as the name suggests, takes another mask and makes a subtraction between each respective bit of the mask.
24
It works like this:
35

46
```ts
@@ -13,7 +15,7 @@ mask = mask.subtract(mask2);
1315
```
1416

1517
:::caution
16-
Masks must have the same size for compatibility reasons.
18+
Both masks must have the same size for compatibility reasons. Images must have the same size, channel number and bit depth.
1719
:::
1820

1921
### Parameters and default values

0 commit comments

Comments
 (0)