Gradient Helper

![]()






week I made a little program called “Gradient Judger.” To use it, you would draw a gradient, scan it in to the computer, then put it in a specific folder, run the program, and presto, it would spit back an analysis of your gradient’s smoothness; and that was all well and good… but long and a little too critical. The computer just got to sit back and judge you after the fact. I thought it would be nice this week to make that process interactive. So what was once the “Gradient Judger”, now becomes the “Gradient Helper.”
This time around the computer look over your shoulder and provides a tool to help you draw a smooth gradient. The algorithm works almost exactly the same: the computer scans each row of a video frame, averages the brightness of the pixels in each row that are not the paper, and then graphs that value on the side; but since I was working in video this time I had to add some customization features: 1) I added a blur to the video frame so that the camera has a better idea of the gradient. 2) I let the user define the ‘active area’ for the camera to look at. 3) The user can ‘grab’ the paper image before they start so that this works almost anywhere.
All in all I like this thing. I really like the idea of a computer looking at a drawing and only being able to mathematically analyze it. I picture a robot rolling into a museum and all these little graphs and numbers popping up on its heads-up display… silly but cute.