07-31-2015 03:51 AM
Hello guys.
I have one bmp to png converter. I need paralleling it.
Cos i need convert 50 pictures in short time as possible.
This my VI, doesnt work with parallel. cos icons are locked and etc.
Have u some idea, how to do this?
Solved! Go to Solution.
07-31-2015 04:07 AM
What do you mean Parallelism here? I see you are trying to convert a *.bmp file to a *.png file. What are you doing in the "png.vi"?
07-31-2015 04:48 AM - edited 07-31-2015 04:51 AM
Hi lacika,
it's no good idea to show VIs without their subVIs! What's inside the missing "png.vi"?
And it's no good idea to handle file path as strings. There are functions to provide filenames without extensions or to build paths!
On parallelism: You already activated the FOR loop parallel execution. Does it help with your problem? (Do you really want to have 64 parallel running file access routines?)
On your needs: what is your (timing) goal? How big/complex are your images?
07-31-2015 06:14 AM
Sorry guys.. my bad..
I want only convert pictures in same time. (paralelized loop)
07-31-2015 06:25 AM
07-31-2015 06:37 AM
I have 53 files to convert... (every 3 mins.)
On best compression, converting spend 1min and 28 seconds.
With parallelizing i want save about 50% of time.
But if I activate parallel execution, it dont save time.
One imagine have about 1.05 MB.
07-31-2015 06:51 AM
Hi lacika,
(every 3 mins.) On best compression, converting spend 1min and 28 seconds.
So you are still within time limits… 🙂
With parallelizing i want save about 50% of time.
Fair value…
But if I activate parallel execution, it dont save time.
Parallizing the FOR loop will only help, when the subVIs allow reentrant operation. As you don't have (full) control of the PictureFile functions you're on a dead end here as you cannot change PNGWrite to reentrant operation…
As long as you are in your time limits I would setup a producer-consumer-scheme for this conversion task. Have a consumer waiting for conversion commands (telling which file to convert) and just feed the queue with filenames…
Other approach: there are several tools for converting images from one format to the other. Many of them can be called as command line tool, so you can call them using SystemExec. This way you can call several instances of such a tool in parallel. Most often they are also faster than LabVIEW.
One imagine have about 1.05 MB.
If it's the BMP size your image has about 600×600 pixel in RGB. That's not huge…
07-31-2015 06:59 AM - edited 07-31-2015 07:00 AM
(every 3 mins.) On best compression, converting spend 1min and 28 seconds.
So you are still within time limits…
No. Every 3 mins, i have new images, but 88sec. is too much. Cos testend sequence waiting for converting.
One imagine have about 1.05 MB.
If it's the BMP size your image has about 600×600 pixel in RGB. That's not huge…
res. 1280x960, grayscale. (but i have 10 000 pics per day)
But if I activate parallel execution, it dont save time.
Parallizing the FOR....
Cruel words for me. 😞
Is there other way how to do parallelized converter?
07-31-2015 07:00 AM - edited 07-31-2015 07:01 AM