Project

General

Profile

About our project » History » Version 14

Anderson PHILLIP, 11/06/2025 03:00 PM

1 9 Anderson PHILLIP
[[Wiki|← Back to Start Page]]
2
3 8 Anderson PHILLIP
h1. Project Details
4 1 Jordan Keiwein LAY
5 10 Jordan Keiwein LAY
---
6
7 1 Jordan Keiwein LAY
h2. Overview
8
9 2 HNIN Ei Shwe Yee
The goal of this project is to create a unified display by merging two projector images into one.  
10
To achieve this, we employed techniques such as *gamma correction*, *alpha blending*, and *intensity adjustments* to refine the final output.
11
12
The project team is organized into several roles:
13
* Project Manager
14
* Team Leader
15
* Doxygen Documentation Team
16
* Wiki Team
17
* Coding Team
18
* UML Design Team
19 1 Jordan Keiwein LAY
20 10 Jordan Keiwein LAY
---
21 1 Jordan Keiwein LAY
22 7 HNIN Ei Shwe Yee
h2. Software and Tools
23 1 Jordan Keiwein LAY
24 7 HNIN Ei Shwe Yee
* *Redmine* – Used to manage project tasks, track progress, and organize team activities.
25
* *Python / OpenCV* – Utilized for image processing operations such as blending, gamma correction, and intensity adjustments.
26 14 Anderson PHILLIP
** *Python / OpenCV*
27 7 HNIN Ei Shwe Yee
* *Doxygen* – Employed to generate detailed code documentation automatically.
28
* *Astah* – Used to design and visualize UML diagrams representing the system’s structure and workflow.
29 1 Jordan Keiwein LAY
30 10 Jordan Keiwein LAY
---
31 1 Jordan Keiwein LAY
32 7 HNIN Ei Shwe Yee
h2. Technology
33 1 Jordan Keiwein LAY
34 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.
35 1 Jordan Keiwein LAY
36 7 HNIN Ei Shwe Yee
To accomplish this, we will apply:
37
* Gamma correction method
38
* Alpha blending
39
* Intensity modification
40 1 Jordan Keiwein LAY
41 7 HNIN Ei Shwe Yee
p=. !{width:800px}car.png!
42 1 Jordan Keiwein LAY
43 10 Jordan Keiwein LAY
---
44
45 7 HNIN Ei Shwe Yee
h2. Alpha Blending Method
46 1 Jordan Keiwein LAY
47 7 HNIN Ei Shwe Yee
Alpha blending merges two images using a specific *alpha value* that determines transparency levels.  
48
This process is crucial in rendering and game development for combining visual elements smoothly and reducing jagged edges.
49 1 Jordan Keiwein LAY
50 7 HNIN Ei Shwe Yee
Our program uses:
51
* *Tkinter* – for the graphical interface  
52
* *OpenCV* – for image manipulation  
53
* *PIL* – for image rendering  
54 1 Jordan Keiwein LAY
55 7 HNIN Ei Shwe Yee
Users can load configuration files, apply gamma correction and alpha blending, and view/save the processed images.
56 11 Anderson PHILLIP
p=.!blendingexmaple.jpg!
57 1 Jordan Keiwein LAY
58 7 HNIN Ei Shwe Yee
External reference:  
59
[https://takinginitiative.net/2010/04/09/directx-10-tutorial-6-transparency-and-alpha-blending/]
60 1 Jordan Keiwein LAY
61 10 Jordan Keiwein LAY
---
62 7 HNIN Ei Shwe Yee
63
h2. Gamma Correction Method
64
65 1 Jordan Keiwein LAY
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:
66 11 Anderson PHILLIP
67
p=. !{width:800px}equation.png!
68 7 HNIN Ei Shwe Yee
69
When the gamma value (γ) is greater than 1, the image appears darker; when it is less than 1, the image appears brighter.
70
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.
71
72
*[Case1: γ=1.0(Before Gamma Correction)]*
73
74
p=. !{width:800px}before.png!
75
External reference:  
76
[http://rs.aoyaman.com/seminar/about10.html]
77
78
*[Case2: γ=0.8(After Gamma Correction)]*
79
80
p=. !{width:800px}after.png!
81
External reference:  
82
[http://rs.aoyaman.com/seminar/about10.html]
83
84
*[Case3: γ=2.0(After Gamma Correction)]*
85
86
p=. !{width:800px}after2.png!
87
External reference:
88
[http://rs.aoyaman.com/seminar/about10.html]
89 1 Jordan Keiwein LAY
90 10 Jordan Keiwein LAY
---
91
92 7 HNIN Ei Shwe Yee
h2. Intensity Modification
93
94
This method adjusts brightness at image edges using gamma correction and alpha blending depending on *image_side* value:
95
* image_side = 1 → intensity decreases toward the left edge  
96
* image_side = 0 → intensity decreases toward the right edge  
97 1 Jordan Keiwein LAY
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.
98 10 Jordan Keiwein LAY
99
---
100 7 HNIN Ei Shwe Yee
101
h2. Transparency
102
103
h3. Gradient Mask Creation
104
105
* The *create_mask()* method (in *MaskCreator* class) generates a smooth transparency gradient using the *smoothstep* function.
106
* This gradient determines the transparency level across the masked region, providing a non-linear transition from fully transparent to fully opaque (or vice versa).
107
* The smoothstep function is used to ensure a gradual and visually smooth change in opacity, minimizing harsh edges.
108
109
h3. Transparency Factor
110
111
* The *transparency_factor* parameter scales the gradient values, directly influencing overall transparency.
112
113
114
* Lower values = more transparent; values closer to 1 = higher opacity.
115
116
h3. Alpha Blending
117
118
* The *alpha_blending()* method applies the alpha gradient to the image within a defined *Region of Interest (ROI)*.
119
* Blending follows the equation:
120
121
p=. *blended = (α × ROI) + (1 − α) × background*
122
123
where:
124
(α × ROI): applies the transparency gradient to the image
125
(1 − α) × background : ensures a gradual transition into the black background.
126
127
h3. Transparency Side Control
128
129
* The direction of the gradient depends on *image_side*:
130
  *Right side* → gradient applied as-is
131
  *Left side* → gradient reversed
132
133
By combining the smoothstep gradient, transparency factor scaling, and alpha blending, this method enables precise control of transparency on the desired side of
134
the image, producing a seamless blending effect.
135 12 Jordan Keiwein LAY
136
---
137
138
h2. Limitations and Possible Enhancements (WIP)
139
140
h3. Limitations
141
142
* The current prototype mainly works with static images, so live video blending or projected alignment adjustments can be limited.
143
* Edge blending only supports left or right sides. Vertical or diagonal blending is not available, which limits flexibility in projector setups.
144
* The current prototype does not support automated calibration or geometric correction, so all alignment between two projectors must be manually handled.
145
* The current prototype expects identical projector usage, so any mismatch in projector properties (birghtness, contrast, color tone) can result in visible seams or image inconsistencies.
146 13 Jordan Keiwein LAY
* The current prototype uses fixed input file names, requiring it to be manually changed.
147 12 Jordan Keiwein LAY
148
h3. Possible Enhancements
149
150
* Implement the ability to adjust parameters like gamma, blend width, and gradient method dynamically in the GUI without restarting the program
151
* Support for multiple video codex, resolutions, and output formats
152
* Expand edge blending to include top, bottom, and diagonal sides