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