Corrosion initiation and growth rate are important properties in maintaining structural integrity, especially for surface and pit corrosion of common infrastructure and transportation metals. In this study, the surface corrosion pit initiation and growth rate on Aluminum 2024(common aerospace alloy) and Steel 304(common alloy for infrastructure) in different pH solutions was measured and values were analyzed by image analysis over a scheduled time. A MATLAB algorithm was developed for detecting the initiation and growth rate of pits as a function of time. The developed algorithm was validated with simulated specimen as well as experiments conducted corrosion specimen. Based on the result of obtained, the MATLAB algorithm predicts the right trends and power law radial xii corrosion pit growth rates and should be useful for corrosion initiation and growth predictions in various metals.