Project

General

Profile

UML Diagram » History » Version 17

Kentaro HARATAKE, 01/16/2025 02:31 PM

1 1 Chung Hsi LIN
h1. UML Diagram
2 2 Chung Hsi LIN
3 7 Man Mong CHAN
[[Wiki]] | [[About_Us]] | [[Project_Overview]] | [[UML_Diagram]] | [[Codes]]
4 5 Mitsuki EIKI
5
6 10 Kentaro HARATAKE
| !PBL4UMLdiagram.png! |
7 12 Areeba KHAN
8 13 Areeba KHAN
h1.  **1. Config Class**
9 15 Areeba KHAN
10 13 Areeba KHAN
Represents configuration settings for image processing and display.
11 1 Chung Hsi LIN
12 14 Areeba KHAN
13 13 Areeba KHAN
h2. **Attributes**:
14 15 Areeba KHAN
15 17 Kentaro HARATAKE
-  projection_distance: float : The distance of the projector.
16 15 Areeba KHAN
17 17 Kentaro HARATAKE
-  projector_distance: float = prd : Alias for  projection_distance .
18 15 Areeba KHAN
19 17 Kentaro HARATAKE
-  img_width: int : Width of the image.
20 15 Areeba KHAN
21 17 Kentaro HARATAKE
-  img_height: int : Height of the image.
22 15 Areeba KHAN
23 17 Kentaro HARATAKE
-  img_path: String : Path to the image file.
24 15 Areeba KHAN
25 17 Kentaro HARATAKE
-  gamma: float : Gamma value for image correction.
26 15 Areeba KHAN
27 17 Kentaro HARATAKE
-  overlapWidth: int : Overlap width between two projected images.
28 15 Areeba KHAN
29 17 Kentaro HARATAKE
-  side: String : The side (e.g., left or right) of the image projection.
30 15 Areeba KHAN
31 17 Kentaro HARATAKE
-  isDualMonitor: boolean : Indicates if dual monitors are being used.
32 15 Areeba KHAN
33 17 Kentaro HARATAKE
-  monitorWidth: int : Width of the monitor.
34 1 Chung Hsi LIN
35 14 Areeba KHAN
36 13 Areeba KHAN
h2. **Functions**:
37 17 Kentaro HARATAKE
- __init__(...) : Constructor to initialize configuration parameters such as projection distance, image dimensions, overlap width, etc.
38 15 Areeba KHAN
39 17 Kentaro HARATAKE
- getProjectionDistance(): float : Returns the projection distance.
40 15 Areeba KHAN
41 17 Kentaro HARATAKE
- getImgWidth(): int : Returns the width of the image.
42 15 Areeba KHAN
43 17 Kentaro HARATAKE
- getImgHeight(): int : Returns the height of the image.
44 15 Areeba KHAN
45 17 Kentaro HARATAKE
- getImgPath(): String : Returns the path of the image.
46 15 Areeba KHAN
47 17 Kentaro HARATAKE
- getGamma(): float : Returns the gamma value.
48 15 Areeba KHAN
49 17 Kentaro HARATAKE
- getOverlapWidth(): int : Returns the overlap width.
50 15 Areeba KHAN
51 17 Kentaro HARATAKE
- getSide(): String : Returns the side (e.g., "left" or "right").
52 15 Areeba KHAN
53 17 Kentaro HARATAKE
- getIsDualMonitor(): boolean : Indicates if dual monitors are used.
54 15 Areeba KHAN
55 17 Kentaro HARATAKE
- getMonitorWidth(): int : Returns the width of the monitor.
56 15 Areeba KHAN
57 17 Kentaro HARATAKE
- readConfigFile(): Config : Reads configuration details from a file and returns a Config object.
58 1 Chung Hsi LIN
59
60 13 Areeba KHAN
61 14 Areeba KHAN
62
63 13 Areeba KHAN
h1. **2. ImgProcessor Class**
64 15 Areeba KHAN
65 13 Areeba KHAN
Handles image processing tasks like blending, gamma correction, and cropping.
66
67 14 Areeba KHAN
68 13 Areeba KHAN
h2. **Attributes**:
69 15 Areeba KHAN
70 17 Kentaro HARATAKE
- config: Config : Holds a reference to a Config object for accessing settings.
71 13 Areeba KHAN
72 14 Areeba KHAN
73 13 Areeba KHAN
h2. **Functions**:
74 15 Areeba KHAN
75 16 Kentaro HARATAKE
- __init__(config: Config): void: Constructor to initialize the ImgProcessor with a Config object.
76 15 Areeba KHAN
77 17 Kentaro HARATAKE
- alphaBlend(l_img: byte[], r_img: byte[]): NDArray : Blends two images (left and right) and returns the result as an array.
78 15 Areeba KHAN
79 16 Kentaro HARATAKE
- GammaCorrection(img: byte[]): byte[]: Applies gamma correction to the given image and returns the corrected image.
80 15 Areeba KHAN
81 17 Kentaro HARATAKE
- CropImage(): byte[] : Crops the image as per configuration and returns the cropped image.
82 15 Areeba KHAN
83 17 Kentaro HARATAKE
- operation0(): void : A placeholder method for any additional operation (not detailed in the diagram).
84 13 Areeba KHAN
85
86 14 Areeba KHAN
87
88 13 Areeba KHAN
89
h1. **3. DisplayImg Class**
90 15 Areeba KHAN
91 13 Areeba KHAN
Represents an image to be displayed, with attributes like width, height, overlap, and side.
92 14 Areeba KHAN
93 13 Areeba KHAN
94
h2. **Attributes**:
95 15 Areeba KHAN
96 17 Kentaro HARATAKE
-  p_width: int : Width of the image.
97 15 Areeba KHAN
98 17 Kentaro HARATAKE
-  p_height: int : Height of the image.
99 15 Areeba KHAN
100 17 Kentaro HARATAKE
-  p_overlap: float : Overlap area of the image.
101 15 Areeba KHAN
102 17 Kentaro HARATAKE
-  img: byte[] : The image data in byte format.
103 15 Areeba KHAN
104 17 Kentaro HARATAKE
-  side: String : The side (e.g., "left" or "right") where the image is displayed.
105 14 Areeba KHAN
106 13 Areeba KHAN
107
h2. **Functions**:
108 15 Areeba KHAN
109 17 Kentaro HARATAKE
-  __init__(w: int, h: int, overlap: float, img: byte[], side: String): void : Constructor to initialize the image dimensions, overlap, and side.
110 15 Areeba KHAN
111 17 Kentaro HARATAKE
-  getImg(): byte[] : Returns the image data.
112 15 Areeba KHAN
113 17 Kentaro HARATAKE
-  getWidth(): int : Returns the width of the image.
114 15 Areeba KHAN
115 17 Kentaro HARATAKE
-  getHeight(): int : Returns the height of the image.
116 15 Areeba KHAN
117 17 Kentaro HARATAKE
-  getOverlap(): int : Returns the overlap area.
118 15 Areeba KHAN
119 17 Kentaro HARATAKE
-  getSide(): String : Returns the side of the image.
120 13 Areeba KHAN
121
122 14 Areeba KHAN
123
124 1 Chung Hsi LIN
h1. **4. MainStitcher Class**
125 15 Areeba KHAN
126 13 Areeba KHAN
Main controller class for image stitching and display.
127
128 14 Areeba KHAN
129 1 Chung Hsi LIN
h2. **Attributes**:
130 15 Areeba KHAN
131 17 Kentaro HARATAKE
-  displayImg: DisplayImg : Holds a reference to a DisplayImg object for managing image display.
132 13 Areeba KHAN
133 14 Areeba KHAN
134 1 Chung Hsi LIN
h2. **Functions**:
135 15 Areeba KHAN
136 17 Kentaro HARATAKE
-  __init__(dlImg: int): void : Constructor to initialize the main stitcher with a DisplayImg object.
137 15 Areeba KHAN
138 17 Kentaro HARATAKE
-  singleDisplay(): void : Manages the display of a single image.
139 15 Areeba KHAN
140 17 Kentaro HARATAKE
-  doubleDisplay(monitorWidth: int): void : Manages the display of two images, considering the monitor width.
141 15 Areeba KHAN
142 17 Kentaro HARATAKE
-  main(): void : The main method that runs the entire program workflow.
143 14 Areeba KHAN
144
145 13 Areeba KHAN
146
147
148 1 Chung Hsi LIN
h1.  Summary of Interactions:
149 15 Areeba KHAN
150 17 Kentaro HARATAKE
- The Config class provides settings to other classes ( ImgProcessor  and  MainStitcher ).
151 15 Areeba KHAN
152 1 Chung Hsi LIN
- The ImgProcessor uses Config to process images.
153 15 Areeba KHAN
154 17 Kentaro HARATAKE
- The DisplayImg class stores the image data and provides its properties to  MainStitcher .
155 15 Areeba KHAN
156 13 Areeba KHAN
- The MainStitcher orchestrates the overall workflow, including image stitching and display management.