Skip to content

Commit

Permalink
update writing styles, fix grammar or typos, and clarify informations.
Browse files Browse the repository at this point in the history
  • Loading branch information
glennhenry committed Aug 10, 2024
1 parent 18263dc commit ef8dd0a
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,54 @@ title: Image Properties
description: Image Properties
---

**Main Source : Various source from Google and Youtube**
**Main Source:**

Computers represent images as a collection pixels which is the smallest unit of an image. A pixel represent color or intensity in a specific location. Image with pixel are called **raster images**.
- **Various source from Google and YouTube**

:::tip
Find out more about images representation in [Computer Images (Part 1)](/computer-graphics/computer-images-part-1) and [Computer Images (Part 2)](/computer-graphics/computer-images-part-2)
:::

A image has more than just a color, it includes various properties that describe more of the image characteristics and attributes. Some of the information such as date taken, image format and compression methods, size, and etc; about image is stored in metadata. Metadata is typically stored in the image file header itself.

Here are some image properties :

1. **Size / Resolution** : The dimensions of the image, related to amount of pixels present in image, measured by width x height. The higher resolution the more detailed the image is.
![Comparison of small to high resolution](./resolution.png)
Source : https://vimeo.com/blog/post/the-basics-of-image-resolution/
Computers represent images as a collection pixel, which is the smallest addressable element within a digital image. A pixel represent color or intensity in a specific location. Images that are represented with grid of pixel are called **raster images**.

2. **Color Space** : Represent how the color are represented, such as RGB, RGBA, CMYK, HSV or grayscale.
![Color space HSL and HSV](./color-space.png)
Source : https://en.wikipedia.org/wiki/HSL_and_HSV
:::tip
More detail about images representation in:

3. **Bit Depth** : Measure of how many number of bits used to represent each pixel in the image. A common bit depth is 8 bit, it is able to represent 256 different color from 0-255. With red, green, blue channel altogether represent 16.777.216 different color.
![Show 8 bit, 10 bit, 12 bit depth with the number of possible colors](./bit-depth.png)
Source : https://youtu.be/6yXYxp0UiVg
- [Computer Images (Part 1)](/computer-graphics/computer-images-part-1)
- [Computer Images (Part 2)](/computer-graphics/computer-images-part-2)
:::

4. **Image Format** : The image format used, such as JPEG, PNG, TIFF, BMP, GIF, or RAW. They represent different feature and compression methods.
A digital image file stores more than just raw image data. It may include image characteristics and attributes. Some of them are: compression methods, image format, and metadata, which refers to data about the image, such as the image dimensions, resolution, color depth, file format, creation date, and more.

5. **Spatial Domain** : Properties that describe the spatial characteristics of the image, such as brightness, contrast, sharpness, texture, edges, and patterns.
More detail about image properties:

- **Brightness** : Overall lightness or darkness of an image.
1. **Size/Resolution**: The dimensions of the image, which is related to the amount of pixels present in image, and measured by width x height. The higher resolution the more detailed the image is.

- **Contrast** : The difference of brightness between the lightest and darkest parts of an image. Higher contrast make lighter part and darker part easier to differentiate.
![Comparison of small to high resolution image](./resolution.png)
Source: https://vimeo.com/blog/post/the-basics-of-image-resolution/

- **Alpha** : Transparency or opacity of an image or a specific pixel within an image. Typically in RGBA color space where the value range between 0 (invisible) to 1 (visible).
2. **Color Space**: Represent how the color are represented, such as RGB, RGBA, CMYK, HSV or grayscale. See also [color representation](/computer-and-programming-fundamentals/data-representation#color).

- **Gamma** : Measure of the contrast between the darker and lighter parts of an image. A higher gamma value means that the darker parts of the image will appear darker, while a lower gamma value means that the darker parts of the image will appear lighter. Gamma correction is an adjustment applied to image pixel values to compensate for differences in the way human eyes perceive brightness.
![Color space HSL and HSV](./color-space.png)
Source: https://en.wikipedia.org/wiki/HSL_and_HSV

- **Saturation** : Saturation controls the intensity or purity of colors in an image. A high saturation value produces vibrant and vivid colors, while a low saturation value results in more muted or grayscale-like colors.
3. **Bit Depth**: Measure how many number of bits are used to represent each pixel in the image. A common bit depth is 8 bit in the RGB color space. It can represent 256 different color each channel. With the red, green, and blue channel altogether, they can represent up to 16.777.216 different color.

- **Hue** : Represents the color itself, such as red, blue, green, etc. It denotes the position of a color on the color wheel.
![Show 8 bit, 10 bit, 12 bit depth with the number of possible colors](./bit-depth.png)
Source: https://youtu.be/6yXYxp0UiVg

- **Dynamic Range** : Range of brightness levels that can be represented in an image, from the darkest shadows to the brightest highlights.
4. **Image Format**: The image format used, such as [JPEG](/digital-media-processing/jpg-jpeg), [PNG](/digital-media-processing/png), [BMP](/digital-media-processing/bmp), TIFF, [GIF](/digital-media-processing/gif), or RAW. They represent different feature and compression methods (if any).

- **Sharpness** : Represents how abrupt is the changes of a pixel color to another.
5. **Spatial Domain**: Properties that describe the spatial characteristics of the image, such as brightness, contrast, sharpness, texture, edges, and patterns.

- **Color Temperature** : Color temperature is a measure of the warmth or coolness of a light source. It is measured in degrees Kelvin. Warm light sources, such as candles and incandescent bulbs, have a low color temperature, while cool light sources, such as fluorescent bulbs and sunlight, have a high color temperature.
- **Brightness**: Overall lightness or darkness of an image.
- **Contrast**: The difference of brightness between the lightest and darkest parts of an image. Higher contrast result in lighter and darker part easier to differentiate.
- **[Alpha](/computer-graphics/computer-images-part-2#alpha)**: The transparency or opacity of an image or a specific pixel within an image. Typically, alpha is specified within the RGBA color space, where the value range between 0 (fully transparent) to 1 (fully opaque).
- **[Gamma](/computer-graphics/computer-images-part-2#gamma)**: Measure the contrast between the darker and lighter parts of an image. A higher gamma value means that the darker parts of the image will appear darker, while a lower gamma value means that the darker parts of the image will appear lighter. An adjustment called **gamma correction** can be applied to image to compensate for differences in the way human eyes perceive brightness.
- **Saturation**: Saturation controls the intensity or purity of colors in an image. A high saturation value produces vibrant and vivid colors, while a low saturation value results in more muted or grayscale-like colors.
- **Hue**: Represents the color itself, such as red, blue, green, etc. It denotes the position of a color on the color wheel.
- **Dynamic Range**: Range of brightness levels that can be represented in an image, from the darkest shadows to the brightest highlights.
- **Sharpness**: Represents how abrupt is the changes of a pixel color to another.
- **Color Temperature**: Color temperature is a measure of the warmth or coolness of a light source. It is measured in degrees Kelvin. Warm light sources, such as candles and incandescent bulbs, have a low color temperature, while cool light sources, such as fluorescent bulbs and sunlight, have a high color temperature.

![Shows how all of the spatial domain affect the image](./spatial-domain.png)
Source : [Brightness](https://www.gifgit.com/image/adjust-image-brightness),
![Shows how all the spatial domain affect the image](./spatial-domain.png)
Source: [Brightness](https://www.gifgit.com/image/adjust-image-brightness),
[Contrast](https://visualdisplaysltd.com/resources/tools/specifying/contrast),
[Alpha](https://blenderartists.org/t/alpha-vs-alpha-clip-transparency-and-display-problem/514289),
[Gamma](https://doc.stride3d.net/4.0/en/manual/graphics/post-effects/color-transforms/gamma-correction.html),
Expand All @@ -62,5 +62,5 @@ Here are some image properties :
[Color Temperature](https://www.ledrise.eu/blog/color-temperature-explained-lr/)

:::tip
Find out more about computer display [here](/computer-graphics/computer-display)
See also [computer display](/computer-graphics/computer-display).
:::
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,59 @@ title: Image Enhancement
description: Image Enhancement
---

**Main Source : Various source from Google and Youtube**
**Main Source:**

**Image Enhancement** is the process of improving the visual quality of an image by adjusting its properties. There are many properties to be adjusted and many techniques to use.
- **Various source from Google and YouTube**

Image enhancement is different with image editing. Image editing is a bigger term that includes changing the content of an image such as removing objects or changing the background. On the other hand image enhancement doesn't change the content, it adjusts the properties of image.
**Image enhancement** is the process of improving the visual quality of an image by adjusting its properties.

Image enhancement differs slightly from image editing. Image editing is a broader term that includes altering the content of an image, such as removing objects or changing the background. In contrast, image enhancement refers to the process that adjusts the properties of the image without changing its content.

![Comparison before and after image is enhanced](./image-enhancement.jpeg)
Source : https://www.behance.net/gallery/115047653/PORTRAIT-EDIT-BEFORE-AFTER
_before and after image enhancement_
Source: https://www.behance.net/gallery/115047653/PORTRAIT-EDIT-BEFORE-AFTER

Examples of enhancement:

1. **Brightness Adjustment**: Modify the overall brightness level of an image. It involves increasing or decreasing the intensity of pixel values to make the image appear brighter or darker. A simple method to adjust brightness is by adding a constant value to all the pixels. This can also be done by multiplying the original pixel value by a brightness factor. This results in increasing the intensity of each pixel, which, if done excessively, will approach the maximum value (e.g., if using RGB it will approach (255, 255, 255), representing white).

Another method is [gamma correction](/computer-graphics/computer-images-part-2#gamma).

1. **Brightness Adjustment** : Modify the overall brightness level of an image. It involves increasing or decreasing the intensity of pixel values to make the image appear brighter or darker. The simple method is to add a constant value to all the pixel. Other method such as gamma correction or histogram equalization also works.
![Brightness adjusted from darker image to lighter image](./brightness-adjustment.png)
Source: https://www.gifgit.com/image/adjust-image-brightness

![Brightness adjusted from darker image to lighter image](./brightness-adjustment.png)
Source : https://www.gifgit.com/image/adjust-image-brightness
2. **Contrast Enhancement**: This aims to improve the visual contrast and distinguishability of details in an image. One method is linear contrast stretching and histogram equalization.

- Histogram Equalization : This is a method to transform pixel intensity of an image by stretching it. The color of image is represented in histogram, then the central distribution will be spread out.
Linear contrast stretching maps original pixel values to a new range of values linearly. For example, a color ranging from 50 to 155 is mapped to 60 to 165. This effect will increase the overall brightness or lightness of the image.

![A centered histogram is spread out](./histogram-equalization.png)
Source : https://commons.wikimedia.org/wiki/File:Histogram_equalization.png
![A graph centered on middle is spread out](./linear-contrast-stretching.png)
Source: https://theailearner.com/2019/01/30/contrast-stretching/

2. **Contrast Enhancement** : It aims to improve the visual contrast and distinguishability of details in an image. The method are : linear contrast transformation, histogram equalization like the previous.
On the other hand, histogram equalization is quite similar to the former. Histogram equalization instead use non-linear transformation. The color of an image is represented as a histogram. The distribution central distribution is then spread out by some non-linear function.

- Linear Contrast Stretching : maps original pixel values to a new range of values. For example a color ranging between 0 to 255 will be mapped to 50 to 255. This effect will be an increase in brightness or lightness of the image.

![A graph centered on middle is spread out](./linear-contrast-stretching.png)
Source : https://theailearner.com/2019/01/30/contrast-stretching/
![A centered histogram is spread out](./histogram-equalization.png)
Source: https://commons.wikimedia.org/wiki/File:Histogram_equalization.png

3. **Color Correction** : Correct the colors of an image by altering the color values of an image. Color correction includes : balancing white color to effect overall warmth or coolness of the colors, removing unwanted color in the scene, adjusting hue and saturation, adjusting color using curves to better smoothen the color.
3. **Color Correction**: Correct the colors of an image by altering its color values. Color correction includes: balancing white color to effect overall warmth or coolness of the colors, removing unwanted color in the scene, adjusting hue and saturation, adjusting color using curves to better smoothen the color.

Color correction differs with color grading. The goal of color correction is to fix color related issues, while color grading enhance the color to achieve desired mood.
![A low saturated image is improved to a brighter image](./color-correction.png)
Source: https://www.studiobinder.com/blog/color-grading-vs-color-correction-process/

![A low saturated image is improved to a brigther image](./color-correction.png)
Source : https://www.studiobinder.com/blog/color-grading-vs-color-correction-process/
:::info
Color correction differs with color grading. The goal of color correction is to fix color related issues, while color grading enhance the color to achieve desired mood.
:::

4. **Image Filtering** : Applies a set of filters which is a mathematical function to the pixel values of the image. Find out more in [Computer Graphics Image Filters](/computer-graphics/signal-processing#image-filters).
4. **Image Filtering**: Applies a set of filters to the pixel values of the image. These filters change the color of each pixel by some amount of value. See also [image filters](/computer-graphics/signal-processing#image-filters).

![Various filter are applied to same image](./image-filter.jpg)
Source : https://www.cosmo.ph/entertainment/how-to-choose-the-best-instagram-filter
![Various filter are applied to same image](./image-filter.jpg)
Source: https://www.cosmo.ph/entertainment/how-to-choose-the-best-instagram-filter

5. **Sharpening** : Enhance the perceived sharpness and clarity of edges and fine details in an image. Sharpening is typically achieved by applying a sharpening filter.
5. **Sharpening**: Enhance the perceived sharpness and clarity of edges in an image. Sharpening is typically achieved by applying a [sharpening filter](/computer-graphics/signal-processing#image-filters).

![Image sharpened using a 3x3 filter](./sharpening.jpeg)
Source : https://ai.stanford.edu/~syyeung/cvweb/tutorial1.html
![Image sharpened using a 3×3 filter](./sharpening.jpeg)
Source: https://ai.stanford.edu/~syyeung/cvweb/tutorial1.html

6. **Noise Reduction** : Process of reducing or removing unwanted noise from an image. Noise is an unwanted signal or data, in the case of image, the random pixel color that degrades image quality and affect visual clarity. Find out more in [DSP Denoising](/digital-signal-processing/denoising)
6. **Noise Reduction**: Process of reducing or removing unwanted noise from an image. Noise is any unwanted signal or data. In the case of image, they can be random pixel color that degrades image quality and affect visual clarity. See also [denoising](/digital-signal-processing/denoising).

![An image with random dots/noise that disrupts the image is removed](./noise-reduction.jpeg)
Source : https://www.dvdfab.cn/resource/video/denoise
![An image with random dots/noise that disrupts the image is removed](./noise-reduction.jpeg)
Source: https://www.dvdfab.cn/resource/video/denoise
Loading

0 comments on commit ef8dd0a

Please sign in to comment.