Automating Runoff Water Calculation using Hough Line Transformations and Atmospheric Data
Advisor: Ms. Covert
Internship Location: Denver, Colorado & UC Berkeley
Onsite Mentor: Marianne Cowherd
My project, Predicting Snow Depth Patterns in Burn Scar Regions, will research the impact of elevation and burn severity on snowmelt rates across burnt areas to help better manage water resources with an improved understanding of post-wildfire snow dynamics. Traditional snow monitoring methods-such as SNOTEL stations are highly limited in scope and have huge upkeep. My study uses time-lapse imagery to collect snow depth data and computer vision techniques to make the analysis more automated, requiring less manual labor and allowing for wider coverage. Fieldwork at the Caldor Fire burn scar in South Lake Tahoe will include data collection across a range of elevations and burn severities using strategically placed cameras and snow poles. A machine learning-based prediction model will be developed for snow accumulation and melting patterns, integral to informed decisions on optimizing water flow into the rivers and reservoirs. This novel integration of environmental science and technology meets a critical need for efficient freshwater management in regions dependent on snowpacks, hence contributing to long-term climate adaptation strategies.
Project Blog
Post 1: Snow, Fire, and Water: Investigating the Impact of Wildfires on Snow Depth
Hello all, and welcome to my first senior project blog post! I'm so excited to take you along in this journey as I explore how wildfires affect snow accumulation and subsequently our dams and reservoirs. This project combines two of my biggest interests: environmental science and technology. I will be using computational methods to analyze snow depth patterns in burned areas.
The integration of technology and environmental research inspired me to work on this project. Climate change is causing an increase in the occurrence and severity of wildfires, and the immediate loss of forests and homes is but the beginning of the devastating effects. One lesser-known but highly relevant consequence has to do with the relationship between burn severity and snowpack-natural reservoirs of fresh water that sustain rivers, ecosystems, and communities. Understanding this relation becomes of crucial importance for better water management and disaster preparedness.
My analysis in this study is the impact of burn severity and elevation on peak snow depth in snowtography images across the Western United States that have been affected by wildfires. Using computer vision, I will try to develop a more automated processing of snow depth data so that it helps improve predictions on water availability in regions of which snowmelt serves as a source of freshwater.
I am very grateful to have my internal advisor, Ms. Illana Covert, and my external advisor, Dr. Marianne Cowherd, who bring invaluable expertise to this project. For the next few months, data collection and analysis of burn scar regions, refinement of software developed, and eventually the building of a predictive model to assess snow depth changes will be done.
This is not a mere research project; it's about finding, with the help of technology, the solution to an environmental problem. I'm eager to share this journey with you, right from data collection in the field down to developing the final model. Stay tuned for my next update, as I look deeper into the research methods and early findings. Thanks for reading, and I look forward to taking this journey with you!
Week 1: Kicking Off: Exploring Wildfire Impacts on Snow Accumulation | Week 1
Hello all,
This week marked the official beginning of my research, and I hit the ground running by diving into literature on wildfire impacts on snow depth. I reviewed studies, including Molotch & Margulis’ work on snow water equivalent distribution, to build a foundational understanding of how burn severity influences snowpack retention.
I also started familiarizing myself with the datasets I’ll be using, particularly snowtography images from wildfire-affected regions in the Western United States. To streamline my analysis, I worked on setting up a data pipeline, ensuring that images are in a consistent format for computational processing. I experimented with different preprocessing techniques to enhance contrast and extract snow depth data more effectively.
Additionally, I began mapping out potential study sites using GIS software, identifying locations that provide a range of elevations and burn severities. This will help ensure a diverse dataset that captures different environmental conditions.
Next week, I plan to refine my data collection methodology further and begin initial computational tests on a subset of images to assess the effectiveness of my chosen image processing techniques.
Excited to see how this project evolves—stay tuned for more updates!
Week 2: Analyzing Initial Data: Snow Depth Extraction and Line Detection Challenges | Week 2
Hello all, and welcome to my Week 2 update on my senior project!
This week, I made significant progress in data collection and preliminary analysis. I successfully gathered initial datasets from our first 10 snowtography cameras positioned across different wildfire-affected regions. These images capture snow accumulation patterns at various elevations and burn severities, giving me a solid foundation for analysis.
Once the data was collected, I began sorting and processing the images using Python. I wrote scripts using OpenCVand NumPy to automate image organization, ensuring that the datasets are structured properly for analysis. To visualize initial trends, I applied edge detection techniques and thresholding algorithms to highlight snow depth variations. Early results indicate notable differences in snow accumulation between low and high burn severity zones.
Additionally, I developed a preliminary data extraction pipeline to convert image features into numerical data. Using the Hough Line Transform, I detected reference markers in the images to measure snow depth changes over time. The first round of extractions revealed an average snow depth decrease of 12% in high burn severity areas compared to lower burn severity sites.
I also examined some of the raw data extracted from the images, focusing on three key columns: Angle, Length, and Snow Depth. The Angle represents the orientation of the camera relative to the ground, which is crucial for ensuring that snow depth measurements are accurately calibrated. The Length column corresponds to the detected height of the snow reference marker, and the Snow Depth column provides the computed snow accumulation in feet. These values allow me to quantify how burn severity affects snow retention over time.
As I reviewed the initial image processing outputs, I noticed some errors in the line detection technique I’m using. The method is generally working, as seen in one of the sample images, but there are inconsistencies in how the lines align with the snow reference markers. Next week, I’ll focus on refining the detection algorithm to improve accuracy and minimize these errors.
Next steps include expanding data collection to additional cameras, refining my feature extraction techniques, and beginning early testing of my predictive model. Excited to see where this takes me—stay tuned for more updates!
Week 3: Refining Snow Depth Detection: Enhancing Accuracy with Advanced Image Processing | Week 3 | Shashwath Senthil
Hello all, and welcome to my Week 3 update on my senior project!
This week, I focused on refining my image processing pipeline to improve snow depth detection accuracy and extract more meaningful data from the images collected at our Colorado site. Specifically, I implemented a more robust line detection method using the Line Segment Detector (LSD) and the Probabilistic Hough Line Transform to improve snow reference marker identification.
To begin, I used the LSD algorithm to detect line segments in the images. By converting images to grayscale and applying this detection method, I was able to highlight potential snow depth markers more effectively than in my previous attempts. However, some inconsistencies in detection remained, especially in images with poor contrast due to lighting conditions or partial obstructions.
To address this, I implemented a secondary processing step using the Probabilistic Hough Line Transform. After applying Canny edge detection, this technique allowed me to refine the detected lines and ensure that only the most relevant ones were considered for analysis. This significantly improved my ability to extract snow depth information from the images.
Once the relevant lines were detected, I cropped the images to isolate the snow reference markers. Using predefined pixel values derived from red-intensity data, I defined a cropping function that removed unnecessary portions of the images while retaining the key areas of interest. This step not only streamlined the analysis but also reduced potential sources of error in subsequent computations.
After refining the image processing steps, I developed a method to count red pixels in the cropped images. Since the snow reference markers are designed with red indicators, this allowed me to quantify the number of red pixels and estimate the snow depth with greater accuracy. The computed red pixel count was then used to generate an alpha value, providing a standardized metric for comparison across different images.
To better visualize the red intensity variations across the images, I created red intensity profiles by summing the red channel values for each column in the processed images. Plotting these values helped identify potential inconsistencies in snow reference marker detection and provided insights into snow accumulation trends at different burn severity levels.
Next steps include further optimizing the detection algorithms, refining the red pixel extraction technique, and integrating this data into a predictive model for snow retention analysis. Excited to see how these refinements enhance my final results—stay tuned for more updates!
Week 4: Visualizing Trends and Tackling Time Series Challenges | Shashwath Senthil
Welcome back to my senior project blog!
This week, I shifted gears from raw image processing to the early stages of data visualization and time series analysis. Using the red pixel snow depth values extracted from the processed images last week, I loaded the cleaned dataset into a structured CSV file and began plotting trends across four different camera sites in Colorado.
I started by plotting snow depth over time for each site, using metadata like elevation and burn severity to contextualize the data. One major issue I ran into was aligning the time series data—while the dates were present, some of the series had inconsistent intervals due to missing or corrupted image captures. This led to mismatched timelines and jagged plots, which made it difficult to analyze elevation or burn severity impacts clearly.
To work around this, I spent part of the week cleaning the CSV and re-indexing it to ensure all camera sites shared a consistent time axis. After that, I grouped the cameras by elevation and created subplots to compare how snow depth evolved over time between these two groups.
From the elevation-based plots, some early trends emerged such as how higher elevation cameras (like Camera 1994 and 518) tended to retain snow longer than their lower elevation counterparts, even when burn severity varied. But the correlation wasn’t always clear-cut—so burn severity still needed to be accounted for.
While analyzing the graphs, I noticed something unexpected: the snow depth data in the CSV maxed out at around 4 feet. But last week, based on pixel-to-depth calculations from the image processing scripts, I was able to measure snow accumulation up to 6 feet in some cases. This mismatch suggests there may be an error or oversight in how snow depth was either capped or recorded when compiling the CSV. Investigating this discrepancy will be a major focus for me next week, as it directly impacts the accuracy of my visual analysis and any resulting predictions.
Next week, I’ll dive deeper into the relationship between burn severity and peak snow depth, analyze whether elevation or burn severity has a more significant influence on snow retention, and work to resolve the 4-foot data cap issue. I’ll also begin normalizing values to account for camera angle discrepancies and measurement variability across sites.
Can’t wait to share what I uncover—stay tuned!
Week 5: Update: In-Depth Data Visualization for Wildfire and Snow Analysis | Shashwath Senthil
This week, I focused on refining my data analysis and visualization techniques to better understand the interplay between wildfire burn severity, elevation, and snow accumulation. I started by loading the snow depth data from a CSV file using pandas and created time series plots for each camera site. Each camera, identified by its unique ID, is linked to specific elevation and burn severity values. By plotting the snow depth for each site over time, I was able to observe seasonal patterns and identify any anomalies that might suggest localized effects.
Next, I divided the camera sites into two groups based on their elevation—one representing higher elevations and the other lower. This separation allowed me to compare how different elevations affect snow depth trends over the same time period. The side-by-side comparison helped to highlight the differences in weather patterns and accumulation processes that occur at varying altitudes.
I also calculated the peak snow depth for each camera and plotted these peaks against the corresponding burn severity values. This scatter plot provided a clear visual representation of the potential correlation between burn severity and the maximum amount of snow accumulated, making it easier to spot any trends or outliers that could inform further analysis. Additionally, by comparing cameras that are close in elevation, I aimed to isolate the influence of other factors, such as local environmental conditions or varying burn intensities, beyond just elevation.
Overall, these visualizations are an important step in building a comprehensive framework to analyze the complex relationship between wildfires and snowpack behavior. The insights gained from these plots will be instrumental in refining the predictive models that will eventually
help improve water management strategies and disaster preparedness. I look forward to integrating more data and continuing to explore these relationships in the upcoming weeks.
Week 6: Update: Exploring Elevation and Snow Depth Relationships
This week, I focused on a foundational question in my project: can we immediately observe a relationship between elevation and snow depth? I began by isolating snow depth data from four individual camera sites, each positioned at different elevations and with varying degrees of wildfire burn severity. The goal was to take a closer look at whether elevation alone could provide some predictive power over how much snow accumulates.
Using Python, I split the dataset by camera and plotted their snow depth over time. I then grouped the cameras into two elevation categories—higher and lower—and created comparative plots to highlight how snowpack differed between these elevation bands. Additionally, I compared cameras with nearly identical elevations to see if burn severity might help explain any remaining differences. This method helped begin building a logical bridge between elevation, burn severity, and snow depth, with the hope of using these early insights to shape the upcoming predictive model.
Although no clear-cut correlation jumped out at first glance, this process was key to narrowing down which variables may be most impactful moving forward. Establishing even weak trends helps guide where to go next with more advanced analysis and machine learning techniques. I’m now preparing to integrate those techniques in the coming weeks to refine and test the predictive capabilities of the model.
Week 7: Blog Post: Digging Deeper into the Why
After spending last week grouping cameras by elevation and visually comparing snow depth trends, I realized it wasn’t enough to just see differences—I wanted to understand why those differences exist. This week, I focused on exploring the underlying reasons for the trends I was seeing, especially the roles of elevation and burn severity in shaping snow accumulation and melt behavior.
What stood out most were the comparisons between cameras placed at nearly identical elevations but with differing burn severities. Take Cameras 518 and 1994, for example. Both are located at high elevations, yet Camera 1994 consistently held more snow. Why? The answer seems to lie in albedo—the reflectivity of the ground surface. Burn areas like the one around Camera 518 have more charred ground and fewer reflective surfaces, which causes more solar radiation to be absorbed and accelerates snowmelt. Camera 1994, in contrast, reflects more sunlight, helping preserve its snowpack longer.
I noticed a similar pattern when comparing Cameras 727 and 308. Despite being practically at the same elevation, Camera 727—situated in a less severely burned area—retained snow longer and saw higher overall accumulation. Camera 308, in the more scorched terrain, lost snow more quickly after each storm. The snow depth dropped sharply after precipitation events, pointing to lower retention capacity likely caused by increased exposure to sunlight and reduced canopy cover.
I also revisited the scatter plot of burn severity versus camera elevation. This plot revealed a clear inverse relationship: the more severely burned the area, the lower the elevation. These trends have begun to paint a consistent picture—burn severity doesn’t just affect how much snow falls, but how long it sticks around. That distinction is important when thinking about water availability later in the season.
This week really helped shift my thinking from “what am I seeing?” to “why am I seeing it?” It’s a big step toward building a model that isn’t just predictive, but informed by the physical processes at play.
Week 8: Blog Post: Final Fieldwork and Shifting Toward the Finish Line
This week marked a major turning point for my project. I traveled to Denver to complete my final field readings, gathering the last needed data from camera sites positioned across varied elevations and burn severity zones. After months of monitoring snow depth trends remotely, it was rewarding to see the landscapes firsthand and verify some of the conditions that might explain earlier anomalies in the data. I collected new measurements, logged observational notes, and ran preliminary checks to ensure that the data quality matched what I had previously gathered.
With all of the field data now in hand, I have started moving toward the final product phase of the project. My goal is to integrate all these snowpack readings into a predictive model that can work alongside existing dam and reservoir management systems. By predicting when reservoirs fed by snowmelt might run dry or overflow, my software tool could help hydroelectric plants and water managers make better-informed decisions about water releases and energy production schedules.
This week was about closing the loop between data collection and application—making the critical shift from observing the problem to actively working toward a solution. Over the next few weeks, I’ll be focused on finalizing the model architecture, validating its accuracy against historical trends, and preparing the final report that ties together everything this project has uncovered.
Week 9: Blog Post: My AI Model Is Now Predicting Snowmelt
This week, my project came full circle. After weeks of gathering data, comparing snow depth patterns, and theorizing about the influence of elevation and burn severity, I’ve now turned those insights into a predictive curve—generated by a functional AI model.
The graph below shows the model’s simulated snow water equivalent (SWE) for the 2022–2023 water year. It follows a realistic seasonal pattern: snow begins to accumulate around November, peaks in March or April, and melts steadily into summer. This curve wasn’t pulled from historical data—it was created by code I built, informed by the trends I studied through camera site observations and statistical comparisons over the past two months.
The AI model works by ingesting elevation, burn severity, and simulated seasonal conditions, then applying a regression-based algorithm to estimate SWE values week by week. While the model is simplified, it offers a valuable tool that could one day be integrated into dam and reservoir infrastructure—predicting when water will be most abundant or dangerously scarce.
This visualization isn’t just a visual milestone—it’s a proof-of-concept that a student-led project can model environmental behavior and propose real-world solutions. I’m incredibly proud of this stage and can’t wait to document how this work can grow even further.
Week 10: Blog Post: Signing Off with Gratitude and Snow
As my senior project comes to a close, I’m filled with a sense of accomplishment and gratitude. What started with camera site comparisons and questions about snow depth has evolved into a fully functioning predictive model that simulates seasonal snowpack behavior.
Over the past few months, I’ve collected data from burned and unburned regions, explored how elevation and fire severity affect snow retention, and visualized these insights through carefully crafted graphs. I then turned those insights into a model that predicts snow depth across a full water year—culminating in the final graph below, which reflects realistic accumulation and melt trends from November to July.
What makes this meaningful is not just the code or the charts—it’s the bigger picture. This project wasn’t just about data science or environmental trends; it was about using technology to better understand our planet and potentially support water and energy management systems in the future.
Thank you for following along on this journey. It’s been a pleasure sharing my progress, frustrations, and breakthroughs with you. I’ve learned so much—not just about snowmelt or Python—but about what it means to take an idea and follow it through to something real.
Until next time,
Shashwath Senthil
BIF '25