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 ef8dd0a commit 58500c4
Show file tree
Hide file tree
Showing 9 changed files with 175 additions and 183 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: Image Enhancement

**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.
Image enhancement differs slightly from [image editing](/digital-media-processing/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)
_before and after image enhancement_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,27 @@ title: Image Restoration
description: Image Restoration
---

**Main Source [Wikipedia Image restoration by artificial intelligence](https://en.wikipedia.org/wiki/Image_restoration_by_artificial_intelligence)**
**Main Source:**

**Image Restoration** is the process of improving the quality or appearance of a digital image that has been degraded or corrupted. By degradation or corrupted, this means image may have noise, blurring, compression artifacts, or other forms of distortion.
- **[Image restoration by artificial intelligence — Wikipedia](https://en.wikipedia.org/wiki/Image_restoration_by_artificial_intelligence)**
- **[Point spread function — Wikipedia](https://en.wikipedia.org/wiki/Point_spread_function)**

**Image restoration** is the process of improving the quality or appearance of a digital image that has been degraded or corrupted. By degradation or corrupted, this means image may have noise, blurring, compression artifacts, or other forms of distortion.

![An image noise is removed and colored from grayscale image](./image-restoration-example.jpg)
Source : https://en.wikipedia.org/wiki/Image_restoration_by_artificial_intelligence

### How does it works

Image restoration works by reversing the process, this will including analyzing the image.

For example if we have a blurred image, the image must lack of sharpness between the pixel color. We will have to figure out what was the method and the parameters such as the blur size, orientation, or intensity used to blur the image.
### Unblur

We will try to estimate the parameter and apply the reverse blur to the image. One of the technique to estimate is the Point Spread Function (PSF).
Image restoration works by reversing the corresponding distortion.

PSF works by treating the blurring process as an optical system. It describe how a point object is spread out by an optical system, such as a camera or microscope. It describes the intensity of light at each point in the image plane. PSF can be thought of as a mathematical representation of the blurring process.
For example, if we have a blurred image, it means that the pixel colors are blended or smoothed out with their neighboring pixels, resulting in a loss of sharp edges and fine details. To unblur the image, we can apply a sharpness filter.

After getting the blur approximation, we can apply reverse blur which involves predicting the original pixel values for each pixel in the blurred image.

A reverse blurred image may introduce another artifacts, so a further enhancement may be done.

![PSF is done to an image](./psf.png)
Source : https://en.wikipedia.org/wiki/Point_spread_function
To really recover the original image, we will need the appropriate sharpness filter (e.g., how intense our sharpness filter should be). In other word, we will need to figure out what was the method and the parameters likely used to blur the image, such as the blur size, orientation, or intensity, to be able to determine the detail of our sharpness filter.

### Image Restoration by AI

Image restoration can also use AI. The AI will be trained with large dataset of images that have been labeled with their ground truth (original) state. This allows the algorithms to learn the patterns that are present in natural images and to use this knowledge to restore degraded images.

We can also use AI for the enhancement technique such as increasing the resolution, denoising, recoloring, and etc.
Image can also be restored using AI technology. The AI model will be trained with a large dataset of images that have been labeled with their ground truth (original) state. This allows the algorithms to learn the patterns that are present in natural images and to use this knowledge to restore degraded images.

![Removing noise from a human eyes](./image-restoration-ai.png)
Source : https://developer.nvidia.com/blog/ai-can-now-fix-your-grainy-photos-by-only-looking-at-grainy-photos/
18 changes: 11 additions & 7 deletions docs/digital-media-processing/05-image-editing/image-editing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ title: Image Editing
description: Image Editing
---

**Image Editing** is the process of modifying content of image such as adjusting image properties, removing object, changing background, cropping part of image, and etc. By modifying content, what it does is modifying each pixel color. There are many technique and tools suited for different target.
**Main Source:**

Image editing is typically done by software such as Photoshop, GIMP, Paint, Canva, and etc. Image editor provides easy way as well as providing many tools such as erasing, cloning, recover specific part of image, cropping and resizing tools, brush and text, filters, and adjusting image properties like brightness and contrast.
- **Various source from Google and YouTube**

**Image editing** is the process of modifying the content of an image, such as adjusting its properties, removing objects, changing the background, cropping parts of the image, and more. Modifying the content involves altering the color of individual pixels. There are many techniques and tools suited for different purposes.

Image editing is typically done using software like Photoshop, GIMP, Paint, Canva, and others. Image editors provide an easy way to modify images and offer various tools such as erasing, cloning, recovering specific parts of the image, cropping and resizing, brushes and text, filters, and adjusting properties like brightness and contrast.

![Image editor user interface](./image-editing-example.png)
Source : https://zapier.com/blog/best-ai-photo-editor/
Expand All @@ -18,18 +22,18 @@ Adobe Photoshop is a commonly used and popular editing software.

#### Photoshop Layer

Photoshop is a layer-based editing system. Layer can be thought as transparent sheet that are stacked on top of each other. These layer stack are responsible for which layer should be visible first. Each layer in Photoshop has its own properties, such as opacity, blending mode, and effects. In real case, a part of image can be stacked so that the part can be edited individually without affecting others.
Photoshop editing revolve around the concept of **layer**. Layer can be thought as transparent sheet that are stacked on top of each other. These layer stack are responsible for which layer should be visible first. Each layer in Photoshop has its own properties, such as opacity, blending mode, and effects. In real case, a part of image can be stacked so that the part can be edited individually without affecting others.

Layer can also be used as non-destructive editing, this mean we don't modify the original image at all, instead we just add layer on top of it. This way we can undo a changes that has been made
Layer can also be used as non-destructive editing, this mean we don't modify the original image at all, instead we just add layer on top of it. In other word, editing is typically done on each new layer. Together, multiple layers form the edited image. This way we can undo a change that has been made on their individual layer.

![A layer of image stacked with additional text from editing software](./photoshop-layer.png)
Source : https://www.desainku.info/2020/01/mengenal-layer-pada-adobe-photoshop.html

#### Example of Changing Background
#### Changing Background

For example, consider a person photo with sky background behind. We can modify the sky to be a space background. We don't want to modify the person, so we will first identify which section belong to the person. Photoshop has tool called "selection tool", it is used to isolate specific areas or objects within an image.
Consider a person photo with sky background behind. We need to modify the background into a space background. We want to avoid altering the person, so we will need to identify which section belong to the person and which is the background.

After isolating it, we can move it to another layer. By separating it to the background layer, we can change the background with a blue color and put the person layer again.
Photoshop has a tool called **selection tool**, which is used to isolate specific areas or objects within an image. Under the hood, the process may include detecting abrupt change of pixel color to determine which region belong to which. We can isolate the person and move it to another layer. The new layer will be the desired background layer.

![A person standing in white background is changed to blue background](./photoshop-change-background.jpeg)
Source : https://www.bwillcreative.com/how-to-change-background-color-in-photoshop/
Loading

0 comments on commit 58500c4

Please sign in to comment.