I'm planning to do some real time 2D grayscale image acquisition. In my case the program will receive a 1D array from a line scan camera one by one. Then the program will construct the image from these arrays(forming a bitmap matrix from arrays). But since buffering and processing/drawing are in series, for large data the frame rate will be very slow.
After reading some articles, I noticed to speed up the frame rate many are using buffers such as double buffer. Below illustrates the concept:
But I am very confused because when I do search for "double buffering C#" another type of thing comes up which is about preventing flickering in WinForms.
What I am looking for is an algorithm, class or library implementation in C# which allocates two buffers(one for I/O other for processing) and performs double buffering. I cannot find any example for such sort of double buffering in C#.
