Project

General

Profile

About our project » History » Version 7

HNIN Ei Shwe Yee, 10/29/2025 11:17 AM

1 2 HNIN Ei Shwe Yee
h1. About the Project
2 1 Jordan Keiwein LAY
3
h2. Overview
4
5 2 HNIN Ei Shwe Yee
The goal of this project is to create a unified display by merging two projector images into one.  
6
To achieve this, we employed techniques such as *gamma correction*, *alpha blending*, and *intensity adjustments* to refine the final output.
7
8
The project team is organized into several roles:
9
* Project Manager
10
* Team Leader
11
* Doxygen Documentation Team
12
* Wiki Team
13
* Coding Team
14
* UML Design Team
15
16 1 Jordan Keiwein LAY
17
18 7 HNIN Ei Shwe Yee
h2. Software and Tools
19 1 Jordan Keiwein LAY
20 7 HNIN Ei Shwe Yee
* *Redmine* – Used to manage project tasks, track progress, and organize team activities.
21
* *Python / OpenCV* – Utilized for image processing operations such as blending, gamma correction, and intensity adjustments.
22
* *Doxygen* – Employed to generate detailed code documentation automatically.
23
* *Astah* – Used to design and visualize UML diagrams representing the system’s structure and workflow.
24 1 Jordan Keiwein LAY
25
26 7 HNIN Ei Shwe Yee
h2. Technology
27 1 Jordan Keiwein LAY
28 7 HNIN Ei Shwe Yee
We plan to use a single flat-screen display illuminated by two projectors connected to separate computers, allowing both images to be projected simultaneously and combined into one seamless image.
29 1 Jordan Keiwein LAY
30 7 HNIN Ei Shwe Yee
To accomplish this, we will apply:
31
* Gamma correction method
32
* Alpha blending
33
* Intensity modification
34 1 Jordan Keiwein LAY
35 7 HNIN Ei Shwe Yee
p=. !{width:800px}car.png!
36 1 Jordan Keiwein LAY
37 7 HNIN Ei Shwe Yee
h2. Alpha Blending Method
38 1 Jordan Keiwein LAY
39 7 HNIN Ei Shwe Yee
Alpha blending merges two images using a specific *alpha value* that determines transparency levels.  
40
This process is crucial in rendering and game development for combining visual elements smoothly and reducing jagged edges.
41 1 Jordan Keiwein LAY
42 7 HNIN Ei Shwe Yee
Our program uses:
43
* *Tkinter* – for the graphical interface  
44
* *OpenCV* – for image manipulation  
45
* *PIL* – for image rendering  
46 1 Jordan Keiwein LAY
47 7 HNIN Ei Shwe Yee
Users can load configuration files, apply gamma correction and alpha blending, and view/save the processed images.
48
!blendingexmaple.jpg!
49 1 Jordan Keiwein LAY
50 7 HNIN Ei Shwe Yee
External reference:  
51
[https://takinginitiative.net/2010/04/09/directx-10-tutorial-6-transparency-and-alpha-blending/]
52
53
54
h2. Gamma Correction Method
55
56
This project uses a technique known as *gamma correction* , which modifies an image’s brightness by adjusting the luminance of each pixel in a *non-linear* way. This method aligns image brightness with *human visual perception* , as the human eye is more sensitive to variations in darker tones than in brighter ones. This biological adaptation allows us to see effectively across a wide range of lighting conditions. Gamma correction applies a *power-law transformation* to pixel values, as represented by the following equation:
57
!{width:800px}equation.png!
58
59
When the gamma value (γ) is greater than 1, the image appears darker; when it is less than 1, the image appears brighter.
60
Note: Since pixel intensity values range between 0 and 255, the process involves first normalizing the image (dividing by 255), then applying the power function using the specified gamma value, and finally scaling the result back to the original 0–255 range.
61
62
*[Case1: γ=1.0(Before Gamma Correction)]*
63
64
p=. !{width:800px}before.png!
65
External reference:  
66
[http://rs.aoyaman.com/seminar/about10.html]
67
68
*[Case2: γ=0.8(After Gamma Correction)]*
69
70
p=. !{width:800px}after.png!
71
External reference:  
72
[http://rs.aoyaman.com/seminar/about10.html]
73
74
*[Case3: γ=2.0(After Gamma Correction)]*
75
76
p=. !{width:800px}after2.png!
77
External reference:
78
[http://rs.aoyaman.com/seminar/about10.html]
79
80
h2. Intensity Modification
81
82
This method adjusts brightness at image edges using gamma correction and alpha blending depending on *image_side* value:
83
* image_side = 1 → intensity decreases toward the left edge  
84
* image_side = 0 → intensity decreases toward the right edge  
85
By combining gamma correction and alpha blending, the method produces a smooth fading effect along the edges, allowing the image to blend seamlessly with the background or another image.
86
87
h2. Transparency
88
89
h3. Gradient Mask Creation
90
91
* The *create_mask()* method (in *MaskCreator* class) generates a smooth transparency gradient using the *smoothstep* function.
92
* This gradient determines the transparency level across the masked region, providing a non-linear transition from fully transparent to fully opaque (or vice versa).
93
* The smoothstep function is used to ensure a gradual and visually smooth change in opacity, minimizing harsh edges.
94
95
h3. Transparency Factor
96
97
* The *transparency_factor* parameter scales the gradient values, directly influencing overall transparency.
98
99
100
* Lower values = more transparent; values closer to 1 = higher opacity.
101
102
h3. Alpha Blending
103
104
* The *alpha_blending()* method applies the alpha gradient to the image within a defined *Region of Interest (ROI)*.
105
* Blending follows the equation:
106
107
p=. *blended = (α × ROI) + (1 − α) × background*
108
109
where:
110
(α × ROI): applies the transparency gradient to the image
111
(1 − α) × background : ensures a gradual transition into the black background.
112
113
h3. Transparency Side Control
114
115
* The direction of the gradient depends on *image_side*:
116
  *Right side* → gradient applied as-is
117
  *Left side* → gradient reversed
118
119
By combining the smoothstep gradient, transparency factor scaling, and alpha blending, this method enables precise control of transparency on the desired side of
120
the image, producing a seamless blending effect.