We present a novel method of enhancing shallow ocean optical images or videos using weighted guided median filter and wavelength properties. Absorption, scattering and color distortion are three major distortion issues for underwater optical imaging. Light rays traveling through water are scattered and absorbed depending on the wavelength. Scattering is caused by large suspended particles, as in turbid water that contains abundant particles, which causes the degradation of the image. Color distortion occurs because different wavelengths are attenuated to different degrees in water, causing ambient underwater environments to be dominated by a bluish tone. Our key contributions are proposed include a novel shallow water imaging model that compensates for the attenuation discrepancy along the propagation path and an effective underwater scene enhancement scheme. The recovered images are characterized by a reduced noised level, better exposure of the dark regions, and improved global contrast where the finest details and edges are enhanced significantly.