An IoT-Based Approach for Visibility Enhancement and Fog Detection