ā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