Two frames with the same shutter speed are read and convert the values of RGB to lumens. Two frames with lumen’s data subtract from each other. The difference between the two frames needs for next step.
//calculate Luminance (standard for certain colour spaces): (0.2126*R + 0.7152*G + 0.0722*B) 
var lumen = Math.round(0.2126 * R + 0.7152 * G + 0.0722 * B);
Then, I converted the values in lumens convert (hash) SHA256. Depending on the resolution of the camera and the speed of your computer, you will generate a data supermassive of about 100,000 hashes per frame. (I know, it’s not so fast, but works in browser).
Further, for fun, I devide the hashes into hexadecimal colors in the hope of getting a new Picasso. But the output was a colored noise in which the universe is viewed in a powerful telescope. It was pleasantly surprised that no repetition patterns could be found, which means that the white noise generator really turned out!
And finally, the idea – if you need for a project a large amount of generated data – just download the blockchain cryptocurrency, for example, Bitcoin)))
My code is too poor to publish. Here is a link to a similar but more professional approach. https://github.com/epitron/webcam-rng