Nowadays, there are a ton of diverse applications that use digital images, notably for earth science. Shadows, for example, might cause some distortions in digital images. In digital images, shadows are a typical occurrence that is regarded as a source of noise in many applications. Shadow results in inaccurate image segmentation, the loss of crucial data, and the degradation of image colors. Therefore, it is crucial to find and eliminate shadows from images. This study shows new advancements in the pixel intensity-based shadow detection method for aerial images of the earth. In the ratio image, which is the ratio of hue over the intensity component of the invariant color models, shadow pixels are brighter than nonshadow pixels. The ratio image output pixels values of our existing method [37] for shadow detection are proposed to be exploited and optimized. Two novel testing algorithms, A and B, were designed to test the claimed changes. While our previous algorithm ratio image was given the average value of the input red, green, and blue (RGB) image components pixels, the new algorithm ratio image is given the minimum and maximum values, respectively, of the input RGB image components pixels. The most accurate algorithm, Algorithm A, was chosen to be the improved algorithm. The input RGB aerial image is transformed into the modified invariant color model hue, saturation, and value (HSV) in step one of algorithm A by selecting the pixels with the lowest intensity value from each input RGB image component in order to maximize the ratio of the image's pixel values. The mathematical power function is then applied to the ratio image to greatly increase the difference in pixel values once the ratio image of hue over value has been produced. The optimum ratio image is then classified using a threshold into pixels with and without shadows. The threshold can more accurately help to categorize pixels as shadow or nonshadow. In this work, we compare the proposed algorithms with our existing algorithm in [37] and some existing methods. Algorithm A has the best results among the proposed algorithms and our existing algorithm in [37], in addition to the testing findings, which show that algorithm A has the ability to detect shadows accurately.