Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How fast can u run this?

Hello
 
I am analysing images for small bright spots.
I found a nice routine to do it with, however it is too slow for my experiment -  it can only run about 20Hz and the rest of my experiment is able to run at 40Hz. Im running on a AMD 64 3700+ and would like to know if anyone out there can run it significantly faster on a faster cpu.
 
I was wondering if I could benefit from a dual core cpu. Since the two convolutions take up most of the time, maybe the convolutions could be done in parallel. Of course this would mean that do the first convolution on image "n", and the second convolution and the rest of the analysis on image "n+1" and use shift registers to transfer the images. Is this possible?
 
Instructions:
Unzip all files to a folder. The "speed test2.vi" loops thorugh 10 images and records the time spend on each process. There is also a image viewing vi if you want to see what the images look like.
 
Thanks
Simon
Download All
0 Kudos
Message 1 of 12
(4,783 Views)

If you could just run the program and post a screenshot of the timings (like the attached) I would be very grateful.

 

Thansk

0 Kudos
Message 2 of 12
(4,774 Views)

Hi, I ran the speed test2.vi and modified your .vi(Two convolutions in the same sequence) and ran it again. You can look at the result from the attached file.

It seems that a faster cpu does improve the execution time.

My system: Pentium(R)4 dual core 3.40GHz with 2.0Gb RAM.

Regards

Message Edited by Morini on 07-12-2006 11:48 AM

-----------------------------------------------------
Dennis Morini
District Sales Manager
National Instruments Denmark
http://www.ni.com/ask
0 Kudos
Message 3 of 12
(4,750 Views)

Yes the execution time is indeed faster - but not very much.

I think that a much faster cpu is needed in order to get the processing time below 25ms. I guess it will take a few years 😞

I could of cause try and rewrite it to see if parallel running on a dual core cpu will help.

 

Thanks

Simon

0 Kudos
Message 4 of 12
(4,738 Views)
0 Kudos
Message 5 of 12
(4,726 Views)

Hi Morini

Could you please try and run this vi?

It has been rewritten in order to make use of dual core cpu's and I would like to see if it makes an impact on the computation time.

Best Regards

Simon

Download All
0 Kudos
Message 6 of 12
(4,653 Views)
Hi, I just found out that my system hasn't a dual core processor!(My bad:-|) I'v only got a pentium(R) processor with HyperThreading.
But it still means that in Labview I can run different parallel processes at the same time. The best way to achieve this split your application up in to two or more while loops, then Labview will run them in parallel.
I can't see an improvment in execution time from Speed_test8.vi. P.max value=S.max value. If you want to see some real difference in execution time between P.max- and S.max value, you will need first of all a Real parallel process with two or more independent While/For loops which contain the convolute functions and you may want to run the loops mor than 11 times. With the execution time of one convolute function in minde, I doubt you will see a real diffence before at least 100 loops and perhaps much more. Again I apologize about the wrong info about my system setup.

 

 
Best Regards
-----------------------------------------------------
Dennis Morini
District Sales Manager
National Instruments Denmark
http://www.ni.com/ask
Message 7 of 12
(4,620 Views)

Hi Morini

You mean that since the two threads are in the same loop the process wont be running parallel?

This test is just tempoary, the real program will be running several hours a day as fast as I can get it to run (hopefully 40 Hz) - since it has to analyse millions of images any speed imporvement would be worth a lot of effort.

0 Kudos
Message 8 of 12
(4,616 Views)

Hi, to make sure that Labview will try to run them in parallel, you have to use independent multiloops.

One more thing: When you test your VI, make sure to do that in runtime. Because Labview doesn't support hyperthreading in edit time. That means you have to build a .exe file.

Regards

-----------------------------------------------------
Dennis Morini
District Sales Manager
National Instruments Denmark
http://www.ni.com/ask
0 Kudos
Message 9 of 12
(4,615 Views)

Hi

Making them run in independent loops is very hard.

The only way I can think of is somehow having the acquisition and analysis running separate, using a series of image buffers. Then two images could be loaded from the buffer simultaniusly and be processed in different threads - while the grabbing just puts images into some kind of ring buffer. Im not completely sure how to do that though.

I tried to change some priorities and setting the convolution as reentrant - it seemed to increase the speed by 5-10%.

I have also made an executable, however it didnt run any faster on my computer. Could you try running it?

I have enclosed a zip file with the executable and 50 images that are looped through. All you need to do is type in the path for the images and then hit run.

Best regards

Simon

Download All
0 Kudos
Message 10 of 12
(4,601 Views)