Experimenting With Background Subtraction

When testing the brightness thresholding example, I found that in order for it to work as required for my piece, then the background behind the person needed to be clear. This is a problem in the public space, due to the walls being covered in pictures and posters, as well as Costa in the background. Therefore, I decided to briefly experiment with background subtraction in order to see if it would benefit my piece.Screen Shot 2015-01-13 at 15.11.36

Here are the before and after screen shots:
Screen Shot 2015-01-13 at 14.51.16

Screen Shot 2015-01-13 at 14.51.30As you can see the background subtraction takes away the green wall and produces an outline around the objects. I experimented with altering the threshold levels and altered various bit of code. However, I felt that the effect looks quite grainy and I was unable to create a silhouette like figure. Also, each time I want to subtract the background, currently I have to hold down the mouse. This may become quite hard in the public space, as there will be lots of people walking around in both the background and foreground and therefore I feel that this effect won’t work as required. Therefore, from this I have decided when displaying my piece in the Weymouth House, I plan to put up a white screen for users to stand in front of. Next, I will usability test my interactive piece, ensuring there is a plain background behind the user.

Advertisements

Processing Video Examples

For my interactive piece, I have analysed some examples that can be relevant towards the creation of my piece. It is important that I understand the programming language used, and that am capable of re-working it myself. There are those that program from scratch and those which hack examples together. Hacking examples together is a programming technique that some use, the advantages of this is that it is quicker and allows ideas to be more complex for those which are not that advanced in programming. However, the disadvantages are that if you don’t understand it, then mistakes can easily be made and it may be hard to resolve if the programming language is not fully understood. The advantages of programming from scratch is that it means your programming knowledge is more developed, meaning you can create complex ideas of which you can resolve errors more easily. However, the disadvantages are that it can take a lot longer as you will be writing out code that sometimes is already easily accessible to use. Therefore, if I do choose to use one of the following examples, it is important that I fully understand the code, which I will evident through the various sketches I have programmed and presented on my blog. If I decide to use one of the examples, it would just form a bit of my piece as I then need to use object orientated programming to create an array of gravitating objects, showing I have the ability to both hack and program. I will go on to analyse each example, understand and edit the code and experiment with trial and error.

Brightness Thresholdingbrightness thresholding v2

This is my favourite example, and I may incorporate it into my piece. Initially, the threshold was lower and therefore the figure isn’t that clear, however by changing the thresholding and positioning of the camera I was able to capture a black silhouette on a white background. Next, I need to go on to add objects the piece, and program it so when they reach a black pixel they move up and when they reach a white pixel they descend.

Motion Detection

motion detection v2

This example detects motion and produces a black outline around a moving figure. It works well, and I like the figure effect. However, it will be harder to program the objects as the black pixels are not as bold and clear as the example above.

Brightness Mirror

brightness mirror v2I like the effect of the grid of squares and think this looks very good and unique. Originally, the size was smaller which I don’t think worked as well, so I adjusted the size of the squares. When adding falling objects to this example, it could come across as being quite confusing and distorted but I think that this is a good back-up example that I could use.

Next, I will go on to experiment further with object orientated programming and will add an array of descending objects to the brightness thresholding example. I will experiment with different objects: shapes, figures, words or graphics, to see which works and looks best.

Shiffman, D, 2008. Learning Processing: Examples [online]. Available from: http://www.learningprocessing.com/examples/ [Accessed 13 December 2014].

Brightness Thresholding Images

I analysed Daniel Shiffmans brightness threshold example and edited the code to create a piece inspired by the surreal photography I have been looking at. Here is the code…Screen Shot 2015-01-11 at 19.24.28

I feel confident in being able to re-work this code as it uses all previous knowledge I have learnt in processing workshops with the addition of threshold. It require the size setup, loading of an image and its pixels, for loop and a conditional statement so that if it is greater than the threshold it is white and black if less than. Here is the edited result:

Screen Shot 2015-01-11 at 19.43.12
I really like the brightness threshold effect and I may incorporate it into my interactive piece. Inspired by Cerise Doucède’s photography, I added floating tennis balls to the piece. Next, I will explore some video effect examples and further develop my idea.