Project 1- Color Changing Fruit
Download the project here…
gradient_interface_jan26.jar
I’ve been thinking about doing this project for quite a while in the general sense of measuring the color change in foods over time. For this project, I attempted to measure the change of color in an apple, an avocado, and a banana while exposed to air over time. In the future I’d really like to try measuring the color of many other things.
To collect the data, I made a white foamcore box and attached a webcam facing in so I could put whatever I wanted to photograph in there and be able to somewhat control the lighting and have a consistent background. I set the camera to take an image every 10 seconds for the apple and avocado, and every 5 minutes for the banana since I figured it would take longer. I still underestimated the amount of time I would need to achieve a dramatic change in color and going back to revise this project that will be the first thing I work on. As you see, the banana’s color didn’t seem to change much and it represents over 48 hours of image-taking.
I was a little bit disappointed with the color quality– namely because it’s very hard to detect much of a difference from the beginning of the gradient to the end, and the colors are very muted. I used Hexadecimal color in order to easily save the strings to a text file and read them out again, but I may try using HSB and see if I can get a little better color quality and distinction. This problem could also be fixed by using a better camera and taking the images over a longer period of time.
I had wanted to end up with photoshop color swatch tables or gradients that users could plug in, but I simply ran out of time to work with this, and I plan to go back and try to do this with the project. Another thing I wish I had done is be more careful with the lighting when taking the images– I covered the box where the images were being taken but I think they were still effected by the lighting changes in the room, which you can see where there is an abrupt hue change in the gradient.
Hi Caryn,
This is a good start on an excellent idea.
I don’t understand why it matters if you’re recording the colors in RGB or HSB space; either way, you’re just recording the values. The raw camera data is RGB so I would use that.
In addition to controlling the lighting better, it’s also worth looking into the control panel settings for the camera, as there may be important options here for setting the white balance. And generally speaking, this project calls for a better camera with professional color control.
If I were doing it myself, I would recommend controlling a Canon SLR from OpenFrameworks, which can automatically control the camera using the Canon SDK. For example, this person has posted code to control the Canon camera from OF: http://www.openframeworks.cc/forum/viewtopic.php?f=12&t=2146&start=15
Hi Caryn – here are the PiratePad notes from the crit.
If you’re looking at it, please copy in the link to her project so I can see it in my browser. thanks.
https://ems.andrew.cmu.edu/2010spring/01/27/project-1-color-changing-fruit/
I love the idea for the project. In addition to controlling the lighting better, it’s also worth looking into the control panel settings for the camera, as there may be important options here for setting the white balance. And generally speaking, this project calls for a better camera with professional color control.
I recommend a TIME AXIS on your chart. That’s basic Tufte! — GL
Patrick points out: the different lengths make it seem like you’re measuring something…
maybe muted colors because the actual fruit in the image is so small, perhaps its averaging in a lot of the background color…
– no, she only averaged the pixels where the fruit was in the image. I’m guessing it’s more of a lighting issue.
This thing is gorgeous. Still the horizontal bars don’t seem to do the data you’ve collected justice. (Wish I had more concrete ideas than that right now.)…if you need access to a large number of cheapo stop-motion digital cameras (<$10 each) for related work let me know. -SB - maybe a circle, where different time segments radially extended from the center... this would also show the contrast between first and last photo - Jon Really interesting interactiveness going on here--love the little slider with the picture! However, I wish that there were some more fruit to show on there. I understand that this process must have taken a while and a lot of effort, so for the time you had--great job! 🙂 Yeah, I agree with the others too: I think some numbers showing the time of the "rotting" fruit process would be good (maybe an horizontal axis near the top?). Or, maybe instead of averaging the colors for each fruit, you could do a mosaic type thing: have a square for each color during each stage of the fruit's rotting process lined up. -Amanda I love the slider interaction and would like to see how it applies to other contexts.This could easily be extended to work with something like Flickr. -MH It could use a header and some axes. It would be cool if the video played automatically. Press play and it plays each picture for X seconds. Maybe try showing everything in reverse, as if it were being reborn from compost. - Jon I don't know if you could do any color adjustment to the video thru after effects auto white balance or something, even though its a webcam - or just editing the images in any post software like photoshop to alter the values with some logic.