LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

print labview imaq image without border

I'm trying to print a labview imaq image by opening it in a new vi which is set to print on opening.
This works fine but, the size of the image can vary and the way I do it now, if the image does not completely fill the image frame, a grid is displayed in the area which is not filled by the image.

what it does:

|
|
|
|
|
0 Kudos
Message 1 of 14
(3,981 Views)
somehow something went wrong, continuing:

what it does:

###########
###########
##+-----+##
##|image|##
##+-----+##
###########
###########
comment: blabla

what I want it to do:

+-----+
|image|
+-----+
comment: blabla

How can I make the IMAQ image display automatically or programmatically size to fit around the image?
0 Kudos
Message 2 of 14
(3,980 Views)
Hello Arend,

I attached a vi which you can use to read the size of the image you acquire and than scale the IMAQ Image Display according those settings. I also build a small example which shows how to use the subvi. They are both in the zip file. They are both written in LabVIEW 7.1 so if you're using an older version please tell me which and I will save it back.

Best Regards,

RikP
Application Engineering
National Instruments
Rik Prins, CLA, CLED
Software Development Engineer
Message 3 of 14
(3,969 Views)
I do work in Labview 7.1, but the provided example does not do what I need.
Maybe I didn't explain well enough:

Here is a screenshot of what happens when I use you program (after modifiying the image diplay slightly)
it's called "example wrong.png"
Ans also a screenshot of how I want it to work
it's called "example right.png"

Do you have any idea how to accomplish this?
Or is your program supposed to do this, but is it not working on my end.
0 Kudos
Message 4 of 14
(3,956 Views)
I've also noticed that you use a property in your "Image Control" called "Image Area Size".
I cannot seem to find this propery if I connect a Image Conrol myself.
Where does this property come from?

Thanks for your work so far by the way.
0 Kudos
Message 5 of 14
(3,952 Views)
Hi Arend,

The property can be created by rightclicking the Image Display terminal in the blockdiagram and than select create->property node. Can you send me the program as you are using it now (the one that prints the wrong images)?

My program works in a way that is aqcuires an image from the camera, reads the size of the image and scales the image display to the correct size so the captured image fits precize inside of the control.

I hope I can help you better if you can send me the program.

Best regards,

RikP
Application Engineering
National Instruments
Rik Prins, CLA, CLED
Software Development Engineer
Message 6 of 14
(3,951 Views)
Sure, here it is.
All I did was some esthetic changes.

It still uses your "Autosize Image Display.vi"

Oh, I did change the default interface, so you'd have to change that back to img0.

thanks
0 Kudos
Message 7 of 14
(3,948 Views)
Oh, and I know how to create the property node, that's no problem.
The problem is, my property node does not have an "Image Area Size" property.
0 Kudos
Message 8 of 14
(3,946 Views)
Hello,

The VI works perfectly at my site. The image is sized just the way it should and printed out perfect. So I guess the version differance must be the problem. Which version of LabVIEW are you using? And which version of NI-IMAQ and NI-Vision Module. Maybe this property is something of a newer version of the software? Does the image not scale at all when you are running the program?

Best regards,

RikP
Application Engineering
National Instruments
Rik Prins, CLA, CLED
Software Development Engineer
Message 9 of 14
(3,942 Views)
Hi,

NI Labview 7.1 base
NI Labview application builder 7.1
NI IMAQ Vision 7.0 for Labview
Ni-IMAQ 2.6.3
I'm using an imaq 1409 board.

The image display does totally nothing but display the image, no scaling whatsoever.
Like I said, the problem might be the missing property in the property node.


Any idea's?
Thanks.
0 Kudos
Message 10 of 14
(3,940 Views)