UML Diagram » History » Version 16
Kentaro HARATAKE, 01/16/2025 02:30 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 | 13 | Areeba KHAN | - `projection_distance: float`: The distance of the projector. |
| 16 | 15 | Areeba KHAN | |
| 17 | 13 | Areeba KHAN | - `projector_distance: float = prd`: Alias for `projection_distance`. |
| 18 | 15 | Areeba KHAN | |
| 19 | 13 | Areeba KHAN | - `img_width: int`: Width of the image. |
| 20 | 15 | Areeba KHAN | |
| 21 | 13 | Areeba KHAN | - `img_height: int`: Height of the image. |
| 22 | 15 | Areeba KHAN | |
| 23 | 13 | Areeba KHAN | - `img_path: String`: Path to the image file. |
| 24 | 15 | Areeba KHAN | |
| 25 | 13 | Areeba KHAN | - `gamma: float`: Gamma value for image correction. |
| 26 | 15 | Areeba KHAN | |
| 27 | 13 | Areeba KHAN | - `overlapWidth: int`: Overlap width between two projected images. |
| 28 | 15 | Areeba KHAN | |
| 29 | 13 | Areeba KHAN | - `side: String`: The side (e.g., left or right) of the image projection. |
| 30 | 15 | Areeba KHAN | |
| 31 | 13 | Areeba KHAN | - `isDualMonitor: boolean`: Indicates if dual monitors are being used. |
| 32 | 15 | Areeba KHAN | |
| 33 | 13 | Areeba KHAN | - `monitorWidth: int`: Width of the monitor. |
| 34 | 1 | Chung Hsi LIN | |
| 35 | 14 | Areeba KHAN | |
| 36 | 13 | Areeba KHAN | h2. **Functions**: |
| 37 | 16 | Kentaro HARATAKE | - __init__(...)`: Constructor to initialize configuration parameters such as projection distance, image dimensions, overlap width, etc. |
| 38 | 15 | Areeba KHAN | |
| 39 | 16 | Kentaro HARATAKE | - getProjectionDistance(): float`: Returns the projection distance. |
| 40 | 15 | Areeba KHAN | |
| 41 | 16 | Kentaro HARATAKE | - getImgWidth(): int`: Returns the width of the image. |
| 42 | 15 | Areeba KHAN | |
| 43 | 16 | Kentaro HARATAKE | - getImgHeight(): int`: Returns the height of the image. |
| 44 | 15 | Areeba KHAN | |
| 45 | 16 | Kentaro HARATAKE | - getImgPath(): String`: Returns the path of the image. |
| 46 | 15 | Areeba KHAN | |
| 47 | 16 | Kentaro HARATAKE | - getGamma(): float`: Returns the gamma value. |
| 48 | 15 | Areeba KHAN | |
| 49 | 16 | Kentaro HARATAKE | - getOverlapWidth(): int`: Returns the overlap width. |
| 50 | 15 | Areeba KHAN | |
| 51 | 16 | Kentaro HARATAKE | - getSide(): String`: Returns the side (e.g., "left" or "right"). |
| 52 | 15 | Areeba KHAN | |
| 53 | 16 | Kentaro HARATAKE | - getIsDualMonitor(): boolean`: Indicates if dual monitors are used. |
| 54 | 15 | Areeba KHAN | |
| 55 | 16 | Kentaro HARATAKE | - getMonitorWidth(): int`: Returns the width of the monitor. |
| 56 | 15 | Areeba KHAN | |
| 57 | 16 | 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 | 16 | 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 | 16 | 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 | 16 | Kentaro HARATAKE | - CropImage(): byte[]`: Crops the image as per configuration and returns the cropped image. |
| 82 | 15 | Areeba KHAN | |
| 83 | 16 | 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 | 13 | Areeba KHAN | - `p_width: int`: Width of the image. |
| 97 | 15 | Areeba KHAN | |
| 98 | 13 | Areeba KHAN | - `p_height: int`: Height of the image. |
| 99 | 15 | Areeba KHAN | |
| 100 | 13 | Areeba KHAN | - `p_overlap: float`: Overlap area of the image. |
| 101 | 15 | Areeba KHAN | |
| 102 | 13 | Areeba KHAN | - `img: byte[]`: The image data in byte format. |
| 103 | 15 | Areeba KHAN | |
| 104 | 13 | Areeba KHAN | - `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 | 13 | Areeba KHAN | - `__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 | 13 | Areeba KHAN | - `getImg(): byte[]`: Returns the image data. |
| 112 | 15 | Areeba KHAN | |
| 113 | 13 | Areeba KHAN | - `getWidth(): int`: Returns the width of the image. |
| 114 | 15 | Areeba KHAN | |
| 115 | 13 | Areeba KHAN | - `getHeight(): int`: Returns the height of the image. |
| 116 | 15 | Areeba KHAN | |
| 117 | 13 | Areeba KHAN | - `getOverlap(): int`: Returns the overlap area. |
| 118 | 15 | Areeba KHAN | |
| 119 | 13 | Areeba KHAN | - `getSide(): String`: Returns the side of the image. |
| 120 | |||
| 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 | 13 | Areeba KHAN | - `displayImg: DisplayImg`: Holds a reference to a DisplayImg object for managing image display. |
| 132 | |||
| 133 | 14 | Areeba KHAN | |
| 134 | 1 | Chung Hsi LIN | h2. **Functions**: |
| 135 | 15 | Areeba KHAN | |
| 136 | 1 | Chung Hsi LIN | - `__init__(dlImg: int): void`: Constructor to initialize the main stitcher with a DisplayImg object. |
| 137 | 15 | Areeba KHAN | |
| 138 | 1 | Chung Hsi LIN | - `singleDisplay(): void`: Manages the display of a single image. |
| 139 | 15 | Areeba KHAN | |
| 140 | 1 | Chung Hsi LIN | - `doubleDisplay(monitorWidth: int): void`: Manages the display of two images, considering the monitor width. |
| 141 | 15 | Areeba KHAN | |
| 142 | 13 | Areeba KHAN | - `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 | 1 | Chung Hsi LIN | - 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 | 1 | Chung Hsi LIN | - 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. |