Fresnel Posted October 31, 2008 Report Share Posted October 31, 2008 Hi, I have wrote a program that can take an input image (from a CCD camera) and I can perform analysis on this image no problem. However, the image is only a 'snapshot'. I'd like to be able to take an average over a set time which I have control over. Any clues would be much appreciated. Quote Link to comment
Neville D Posted October 31, 2008 Report Share Posted October 31, 2008 QUOTE (Fresnel @ Oct 30 2008, 08:53 AM) However, the image is only a 'snapshot'. I'd like to be able to take an average over a set time which I have control over. Any clues would be much appreciated. Do you mean average of the images or an average of whatever operation you are performing? If you want to average say 5 images, then collect 5 snapshots in 5 different buffers and use the VI's from the Operator pallet to add them two at a time, and later divide by 5. N. Quote Link to comment
Fresnel Posted October 31, 2008 Author Report Share Posted October 31, 2008 QUOTE (Neville D @ Oct 30 2008, 04:03 PM) Do you mean average of the images or an average of whatever operation you are performing?If you want to average say 5 images, then collect 5 snapshots in 5 different buffers and use the VI's from the Operator pallet to add them two at a time, and later divide by 5. N. The CCD camera is continually measuring an image from a laser. When I hit the 'stop' button on my program, the current image is then analysed. I would like to let the CCD image run for say ~100s and to get an average set of results over that given time period. Quote Link to comment
Neville D Posted October 31, 2008 Report Share Posted October 31, 2008 QUOTE (Fresnel @ Oct 30 2008, 09:21 AM) The CCD camera is continually measuring an image from a laser. When I hit the 'stop' button on my program, the current image is then analysed.I would like to let the CCD image run for say ~100s and to get an average set of results over that given time period. What do you mean by results?? Post some code and take a look at http://www.catb.org/%7Eesr/faqs/smart-questions.html' rel='nofollow' target="_blank">this N. Quote Link to comment
LAVA 1.0 Content Posted November 2, 2008 Report Share Posted November 2, 2008 Hi, Are you using IMAQdx and IMAQdx If youre using the snapshot VI then probaly thats the problem. This Vi only allows you to get one image at a time (using a lot of time to do so). Perhaps a better idea is to use the low-level Vi. First open a session to a camera, then configure it (set the mode the continuous and set a large buffer), then start the aquisition proces. The camera will now send a continuous stream via DMA into the NI(ring)-buffer with the set size. Now you can use the GetImage VI to copy the image from ring buffer into a user image and proces it. The camera will stream Hi, Are you using IMAQdx and IMAQdx snap function? If this is the case probaly the snapshot VI is your problem. This Vi will only bring you one image at a time (using a lot of time to do so). Perhaps a better idea is to use the low-level Vi. First open a session to a camera, then configure it (imaqdx configure aquisition.vi). Be sure to set the mode to continuous and setup your buffersize, then start the aquisition proces (imaqdx start aquisition). The camera will now send a continuous stream of data via DMA into the NI(ring)-buffer. Now use the imaqdx getimage.vi to copy a image from ring buffer into a user-image and proces it. You can select the image you interrested in (buffer number, last (n) or next (n+1). If your processing is faster then your processing (for CCD normaly below 40ms) you can proces every image on-the-fly. If it takes longer you need to setup the image buffer large enough, and copy the image out on a lower rate using the buffer number. Dont forget to stop the data stream from the camera using imaqdx stop aquisition and close the reference at the end of your application. These two examples would be interresting: [Low-Level Grab Async.vi] and [Grab and Detect Skipped Buffer.vi] Regards Patrick Quote Link to comment
Fresnel Posted November 5, 2008 Author Report Share Posted November 5, 2008 QUOTE (Akker@Vision @ Nov 1 2008, 09:22 PM) Hi,Are you using IMAQdx and IMAQdx If youre using the snapshot VI then probaly thats the problem. This Vi only allows you to get one image at a time (using a lot of time to do so). Perhaps a better idea is to use the low-level Vi. First open a session to a camera, then configure it (set the mode the continuous and set a large buffer), then start the aquisition proces. The camera will now send a continuous stream via DMA into the NI(ring)-buffer with the set size. Now you can use the GetImage VI to copy the image from ring buffer into a user image and proces it. The camera will stream Hi, Are you using IMAQdx and IMAQdx snap function? If this is the case probaly the snapshot VI is your problem. This Vi will only bring you one image at a time (using a lot of time to do so). Perhaps a better idea is to use the low-level Vi. First open a session to a camera, then configure it (imaqdx configure aquisition.vi). Be sure to set the mode to continuous and setup your buffersize, then start the aquisition proces (imaqdx start aquisition). The camera will now send a continuous stream of data via DMA into the NI(ring)-buffer. Now use the imaqdx getimage.vi to copy a image from ring buffer into a user-image and proces it. You can select the image you interrested in (buffer number, last (n) or next (n+1). If your processing is faster then your processing (for CCD normaly below 40ms) you can proces every image on-the-fly. If it takes longer you need to setup the image buffer large enough, and copy the image out on a lower rate using the buffer number. Dont forget to stop the data stream from the camera using imaqdx stop aquisition and close the reference at the end of your application. These two examples would be interresting: [Low-Level Grab Async.vi] and [Grab and Detect Skipped Buffer.vi] Regards Patrick I realise that taking a snapshot regularly over a given time would be very complicated, therefore I'd like to take a snapshot of an image and analyse it (as my program currently does) but when the image is captured, start a timer which runs for a given period of time before capturing a new image and analysing that. Quote Link to comment
Fresnel Posted November 5, 2008 Author Report Share Posted November 5, 2008 QUOTE (Fresnel @ Nov 4 2008, 11:38 AM) I am looking to calculate the Allan Variance of my experimental setup, ie how stable my laser is. Monitoring the centroid positionwas easy enough to do continuously by including it in my while loop and I can now observe a waveform chart of the x and y centroid position with time. Calculating the Allan variance could be a bit more tricky as Labview doesn't have a function to do this. Anybody ever attempted to do this before? Here is a copy of the basics of my setup as a VI. I'd be looking to add to this a part that calculates the allan variance. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.