For my video processing program, I'm attempting to merge a series of video frames to get a sensation of a higher frame rate but be played back at a higher speed. Merging 5 frames together (5 BMP files) for example, has 5 frames merged together, appears to play at 150 fps but plays back at 30 fps giving the sense of 5x time. What my question is involves reading and writing multidimensional arrays, 2D arrays in my case. How would I do so in my read/write functions and set it up otherwise?
The two questions/concerns are:Code:... // includes, defines and globals unsigned char FrameData[1036800][5]; // 5 frames' worth of 720x480x24 images ... // other globals and function to get file path and names fread(&FrameData[0], 1, 1036800, FileHandle); // read 1,036,800 bytes of dataj // ??? ... // Brighten, merge, then crop - these functions (except the newest merge) all work as expected but need adjusting fwrite(&OutputFrameData, 1, CroppedImageDataSize, FileHandle); // write related single frame ... // main function
1. For the variable declaration, what should the order of the elements be? In other words, should the big number be first or second?
2. Since I want to read the data into the large part of the array, how would I do so?
The reason is for a loop to process the input frames making it easier to do (otherwise, it'd just be a big mess with many very similar instructions.