Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
p5js-webcam1 [2024/04/14 07:19] renickp5js-webcam1 [2024/08/22 00:01] (current) renick
Line 51: Line 51:
 <iframe src="https://editor.p5js.org/renick/sketches/MtOctI5y-" width=99% height=800></iframe> <iframe src="https://editor.p5js.org/renick/sketches/MtOctI5y-" width=99% height=800></iframe>
 </HTML> </HTML>
 +
 +===== more on the webcam =====
 +
 +This set of videos by Jeff Thompson (http://www.jeffreythompson.org/) shows a nice trick for getting a performant grid of x/y values and using the red value for that pixel as a measure of brightness and mapping that to the size of a circle to be drawn at that point
 +
 +  - https://www.youtube.com/watch?v=G3WxVV7aN4I
 +  - https://www.youtube.com/watch?v=VYg-YdGpW1o
 +
 +His code is at this link: https://editor.p5js.org/jeffThompson/sketches/Y2xbIzxpI
 +
 +He explains how to get a particular pixel value in these videos:
 +
 +  - (basics) https://www.youtube.com/watch?v=pxm7A4mEwoQ
 +  - (more performant by reading the flat pixel array) https://www.youtube.com/watch?v=u5lkHcbiFt0
 +
 +Here's a useful example from Kokyoong Lim for some simple motion detection:
 +
 +  - https://editor.p5js.org/limkokyoong.etc/sketches/MaZMF_iz4
  
  • p5js-webcam1.1713104371.txt.gz
  • Last modified: 14 months ago
  • by renick