i´m using the Brightness Thresholding Example, that is coming with processing (see the code below).
I would like to know if there is a way to count, catch or control the pixels (in this example). The example already distinguishes
the bright pixels and set them into white and the darker pixels and put them into black.
For my purpose It would suffice to set the background to black an only let the program put the white pixels (but that makes my sketch flicker),
and eventually count/catch/control only the white pixels for further use.
My Plan is to further work with my pixels like in the following sketch:
Hello,
I´m another newbee in processing and programming.
I have a problem with the while loop, I want the loop "open the windowflaps" in my picture. Till now they are only closed. I would like to use a while loop, so while the cursor is close to or directly on the window, the flap-area just change it´s position directly next to it´s window (like as it´s would be opend to the right / =+ 50 on x axis) and you can see the "glass".
But only of that one window, not all the windowflaps!
I don´t even know if the while loop is right here. Maybe this is a super easy question but i just don´t get it.
I would be happy to get a clue or solution to my problem by one of you, thanks!
Here´s my sketch:
int nr = 4; // Anzahl
float fpx = 50; // flapposition x
float fpy = 50; // flapposition y
float nfpn = fpx+50; // new flapposition