03-19-2013 08:56 AM
Hello,
I've come across a rather curious problem. In a visual inspection machine we create some 8-bit 16MPixel images. These are then computed into single-precision images. After image processing we display some kinds of result images to the user. Here the user can use the mouse over the image display and gets a reading for the current image sector where the mouse is currently positioned. If the displayed image is U8 or RGB everything is fine.
However, if the display holds one of the 32bit grayscale images things become quite slow, by a factor of 5 to 10 approximately. Now I can see that 32 bit is quite a bit larger than 8bit, so I would assume an increase in overlay time by a maximum factor of 4.
Since the images are quite big, one update takes about 90-100ms with the 32bit image, whereas the same action requires hardly more than 10 to 20 ms with U8 and even RGB. Because the mouse movement is caught by an event structure all movements are processed and finally queuing up to cause a lock of the software until all those events are dealt with. This leads to ridiculously long "freeze" times of the software, sometimes as long as 20 sec, as I witnessed via an event log a implemented for this purpose.
Attached is an example code which shows the unusually long processing time for overlays on SGL-images. If there is any suggestion I'd be happy to read them. Thanks in advance.
Falk
Solved! Go to Solution.
03-25-2013 05:52 AM
Hi comrade.
I saw in your VIs, a Path, did you use a special Sample for this Issue?
Can you send us also the Images that you use and the Steps to reproduce this Issue?
i will try it with my System and tell you the results.
Best regards
03-25-2013 06:27 AM
In order to reproduce the behaviour no special image is needed. Take any 8bit picture you like, the larger the better, as the absolute difference in computation time will be greater.
I attached a random example picture in 8Bit PNG format. Feel free to resample to 16MP 😉
03-25-2013 06:31 AM
Forgot the steps for reproducing the behaviour.
Load the image and see how long the overlay update takes in 8 Bit
switch to single precision representation and again check the time it take for the overlay to build.
Notice the difference being somewhat between factor 5 and 10. This is best recognisable on larger images where there is a significant drag of the overlay trailing behind the mouse arrow
04-04-2013 09:27 AM
After an in-depth discussion with the German NI support we figured out that it is not mainly the Overlay action that's consuming the time but rather my image display update after every event action. As my goal was to provide the user with the most current image information available as close to the mouse position as possible there doesn't seem another way to do this while not compromising the goal I explained.
Several alternative ideas we had (some don't work though) are briefly explained below:
I guess my choice will be 2.
If anyone has other ideas about this I'll still be glad to hear about them.
04-05-2013 02:41 AM
Dear comrade,
thank you very much for the close and constructive cooperation.
Best regards,