11-02-2020 09:16 PM
Hi, i recently made my first VI (so apologies for the messy VI) and am using it to acquire data from a USB color camera. The purpose of the vi was to extract 2-D intensity plots and 1-D intensity traces with the camera for each separate color (R,G,B) as the camera was running.
I then attempted to average several frames of the images by using a for loop where I've converted the images into array form and add it via a shift register to an initialized array. While it does seem to be working and averaging the frames as expected, for some reason my image data is truncated to 1280 x 1280 pixels, while the resolution I've set the camera to is 2048x1536. In the image I've attached, the intensity plot for blue color (left) is fed through the loop with just regular loop tunnels, while the red is fed through shift register where the array size is reduced to 1280 x 1280. Can also see this in the 1-D plots where I've used shift registers for red and green.
I think this should be an easy solve but I can't figure out why its specifically truncated to 1280 pixels with the shift register, any help in figuring this out would be greatly appreciated.
Solved! Go to Solution.
11-02-2020 09:50 PM - edited 11-02-2020 09:53 PM
Initialize your shift register with arrays of the correct size. Setting the index of the array container has nothing to do with array size, it just determines what element is shown in the upper left.. Use "initialize array" instead.
(Can't say much about the rest of the code because most subVIs are missing. I don't have your modules)
11-03-2020 01:49 AM
Cheers, this worked.