Occurrence of shadowy pixels in remote sensing images is a common phenomenon particularly with passive sensors. In these cases, analysts may treat these pixels as a separate land cover class. This may result in the loss of information present in the shadowy pixels A better approach may be to correct light intensity values in shadowy pixels and use the light-corrected image to produce a land cover map. Most light intensity correction algorithms are not designed to optimize the classification performance. Consequently, the accuracy of a resulting land cover map may be degraded. As a result, this paper proposes a new approach to simultaneously determine the land cover map and determine the light intensity value of shadowy pixels based on a Markov random field model. With this approach, the light intensity correction is performed such that the classification accuracy is maximized. The outputs of the proposed algorithm are a land cover map and shadow-free remote sensing image.