01-02-2025 05:28 AM - edited 01-02-2025 05:29 AM
I am doing some benchmarking trying to find a more efficient way to convert a IMAQ reference to JPEG in memory and have noticed that how I wire the IMAQ reference makes a significant difference in the execution time.
With it connected as shown below it takes about 35ms to execute the flatten image to string function.
If I connect it via the annotated route (Through the first frame of the case structure) it takes about 5ms to run
There is an underlying question of is there a more efficient way of flattening an image to a JPEG binary in memory? I also need to do the reverse (Convert a JPEG to an IMAQ reference without writing it to disk), at the moment I am using something I found on the forums (I can't find the post now) which implements some Win32 API calls to do the decoding.
In summary:
Solved! Go to Solution.
01-02-2025 05:36 AM - edited 01-02-2025 05:45 AM
Hi Worle,
@Worle wrote:
Why does that the minor wiring change shown above make a 7x difference in execution speed
Because you change the measured code sequence NOTICEABLE!
All this is clearly defined by THINK DATAFLOW!
Conclusion: the FlattenToString will need about 5ms, the IMAQRead will need about 30ms (~60 30Hz frame rate)…
01-02-2025 05:41 AM
Of course....
I am going to blame that on a slow ramp up after christmas...