|
Algorithm 1 Image Enhancement Processing |
| Input:
. |
| Output:
|
| 1 is the original image matrix, is the enhanced image matrix. |
| 2 FOR
p = 1: s //s is the number of image samples |
| 3 Implement random cropping based on grayscale matching for : |
| 4 (i) Perform random cropping, according to Formulas (4) and (5): |
| 5 . |
| 6 (ii) Determine whether the following conditions are met:
|
| 7
|
| 8 Randomly shift the randomly cropped image tensor according to Equation (6): |
| 9
|
| 10 Randomly rotate according to Formula (7): |
| 11
|
| 12 Randomly scale according to Formula (8): |
| 13
|
| 14 Randomly adjust the brightness of according to Equation (9): |
| 15
|
| 16 Normalize the enhanced, small-sized image according to Equation (10): |
| 17
|
| 18 END
|
| 19 Return
|