Hi I am new to using PureData and I am looking for my help.? I am trying to take a video file, currently one from the harddrvie but eventually a streaming feed, and look at each pixel in each frame and consider the RGB values of the pixels.? I want to then look at those values and calculate a ratio of R-G and G-B and then determine what color I would like to? change that pixel based on the ratio.? I believe I have found a good way to get the data of the pixel, by taking a metro and a counter with the width and height of the video and divinding by the width and and height and stepping through the frame and send it to pix_data.? i unpack the RGB values and calculate the ratio i need.? I am having trouble changing the pixel value to the color i want.? I am looking for some insight on the best way to approach?this, or if there is a better way to do it from scrath, or if you think it would be more efficient to use another program and if you all know of any other programs.? Thank you for your help. ? ~Sean
It seems to me that the most efficient way of doing this would be with a custom GLSL shader.
On Mon, 14 Jun 2010, Ben Baker-Smith wrote:
It seems to me that the most efficient way of doing this would be with a custom GLSL shader.
depends what you need to use the result for. If it has to be used by a pix-object, do you feel like redownloading the result of the GLSL back into the CPU-RAM ?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801