GitHub repository: JenniferHLao/Foggy-City
Created: 2018-04-05T03:34:48Z
Description: Searches through.a picture and determines how foggy a picture is based on the percentage of pixels containing the specific RGB value.   This program was used to practice using RGB values and the PIL operator to sort pixels based off of a numeric value, while timing the process. Initially, I had to import both the time and PIL module, and use it to open the jpg within the program. Following uploading, I initialized the number of foggy pixels to 0, and then used a nested for loop to go through each individual pixel to assess whether it was in the range of color accepted as “fog colored”. If the pixel was determined to be within the range of foggy, it was added to the fog counter. Once it was done looping through each pixel, the total of fog pixels was then divided by the total resolution of the photo (width times height) and multiplied by 100 to produce the percent of the city that was foggy. Moreover, by using the time.time function I was able to time the program as taking roughly .7 seconds to complete the task. This program was used to as a practical application for the PIL operator within python.