Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image memory allocation

I am working on image resampling to display my image properly on the front panel. However since my image contains important features that is as small as 10 pixels, resampling/resizing will affect my later processes. I've programed my vi to only use the zoom feature of the image display but this way of displaying the image is rather unsatisfactory as it only allows certain zoom factors and since I have limited front panel space, I want as much of the image as possible to be displayed without having to use the scroll bar. Due to these reasons I decided to code a subvi to resample the image only for display purpose and use the original image for real processing. Is there any alternative cause such way od displaying the image is very troublesome since I have to call the same subvi over and over again whenever there is new changes to the image during various stages of processing?

I have another unrelated question. IF I were to create 2 images of the same name with IMAQ Create, will they cause any problem?

Thank you.
0 Kudos
Message 1 of 4
(3,722 Views)
JoshMonkey -

I can't help you with your first question, but I can answer your second. Creating two images of the same name will cause problems - the second call to IMAQ Create with the same image name will return the image that you created with the first call, except it will be resized to 0x0 (and the type may have changed, if you specify a different type). So, your original image will be gone.

Greg Stoll
IMAQ R & D
National Instruments
Greg Stoll
LabVIEW R&D
0 Kudos
Message 2 of 4
(3,707 Views)
Hello,

Do you have the Vision Development Module installed on your system? You could try using a WindDraw window to display the image in a separate window. Doing this, you could then use the IMAQ WindZoom function with a scaling factor that runs from +/- 1 to 16. This should provide additional zoom factors for you. You could determine the zoom factor based upon the dimensions of the image that you are acquiring.

If you have Vision, try using this VI and let me know if you have any additional questions.

Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 3 of 4
(3,704 Views)
Gregstoll, thank you for answering my question. I was actually very tempted to include a IMAQ Create in a subvi to create an image with a specified name but as you said sharing the same image name will cause trouble so I guess I have no choice but to create the image individually.

Also I've experimented with IMAQ Create in subvi and found that I couldn't get around using it in the subvi. What I did was:
I use IMAQ to create an image, then the image undergoes certain image processing steps, finally I would like to pass the resulted image (same image) out of the subvi and then use IMAQ Dispose to dispose the image in the subvi. I find that disposing the image will be impossible if I want the image out of the subvi even if it's just to make a "snapshot" on the image display.


Hi Scott R,
As for your suggestion, I have actually decided against displaying the image in a separate window/floating window cos I thought it would interfere with the front panel. However your suggestion reminded me that there is this trick I can use to embed the floating window on top of the parent to make it look like the image display. I'm actually more familiar working with image display and have not much experience using the Vision Utilities/External Display vis. I've tested some of the vis and thoughtt that they are not as easy to code as image display. Also in my opinion image display is much easier to get/draw ROI or display ROI and easier to use.Thanks for your help thou. I'll see what if it can achieve what I wanted.
0 Kudos
Message 4 of 4
(3,700 Views)