04-23-2024 08:12 AM
I am acquiring images by using a XY raster scan at the rate of between 10ms and 100ms per pixel. Hence for a 128x128 image, it might take over an hour to acquire the image. So far, I am only able to display the image once it has been acquired in entirety. Is there a way to add each new pixel to the image as it is collected and ideally change the grey scale in case part of the image becomes much brighter or darker during acquisition?
Thanks in advance
Chris
Solved! Go to Solution.
04-23-2024 08:28 AM - edited 04-23-2024 08:30 AM
Hi Chris,
@cghw wrote:
Is there a way to add each new pixel to the image as it is collected and ideally change the grey scale in case part of the image becomes much brighter or darker during acquisition?
Yes.
What have you tried and where are you stuck?
@cghw wrote:
scan at the rate of between 10ms and 100ms per pixel.
Hence for a 128x128 image, it might take over an hour to acquire the image
128×128×0.1s ~= 1640s, so less than half an hour… 😄
04-23-2024 09:41 AM
Hi Gerd,
thanks for the quick response. I attach some code snipped out from a larger project (hence the code - ScanXYDummy_1.vi - doesn't work on it's own). I am using the intensity graph to view the image. I have also explored IMAQ to see if there were possibilities there, but didn't find anything I thought I could use.
Thanks in advance.
Chris
04-23-2024 09:43 AM
By the way, I forgot to mention that we also have some settling time delays in our acquisition, so the total time is quite a bit more than the number of pixels times the dwell time.
Thanks again
Chris
04-23-2024 11:20 AM
Create a 128X128 array of zero values, and display it in an intensity graph.
Each time you get a new pixel, copy it over the array element in the correct (row, column) location.
Display the modified array in an intensity graph.
Repeat the second two steps until the image is complete.
You can set up the intensity graph to autoscale or use the max and min of the input pixel values to set the range each time you update a pixel value.
I usually use a gray scale map for intensity graphs. You do not need IMAQ for display.
04-24-2024 01:44 AM
Hi Chris,
@cghw wrote:
Hi Gerd,
thanks for the quick response. I attach some code snipped out from a larger project (hence the code - ScanXYDummy_1.vi - doesn't work on it's own). I am using the intensity graph to view the image.
The "Electron count" graph needs to be placed and updated inside your loop when you want to show/see the updates!
Btw. when using an event structure then the event cases should be executed as fast as possible. When your "Start scan" event lasts for ~ one hour then you clearly violate this recommendation!
I recommend to use a QMH design (or even a simple state machine) instead…
04-24-2024 08:20 AM
Thanks john, your suggestion worked. I will try to figure out to mark the topic as solved.
Best Wishes
Chris
04-24-2024 08:21 AM
Thanks Gerd, I will try to take on board your suggestions. The code was part of a larger program, so this might take a little while to implement !
Best Wishes
Chris