LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scale Picture via 3D Picture Control?

I need to modify one of my programs that currently displays pictures in a 512x512 picture control to display 1392x1040 images.  This is not particularly easy, since you really can't fit much else on the screen at the same time asa  1392x1040 image.

I'm not about to purchase the image manipulation tools from NI just for this purpose.  But it occurs to me: what if I use a 3D picture control, use the image as a texture on one side of a really thin rectangular solid, and then scale the object?  Is this feasible?
0 Kudos
Message 1 of 10
(4,948 Views)
    Hi,

I dont know if it is going to actually going to change the pixel size. IMHO, it is probably going to stretch the image instead. Do you have an example of doing this?
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 2 of 10
(4,905 Views)
Did you notice that the picture control has a very nice zoom function that accepts real numbers ? Just create a property node (right click on the picture terminal > create > Property node...).
That way you shoud be able to scale your image up or down at will.

Message Edité par chilly charly le 05-12-2008 05:26 PM
Chilly Charly    (aka CC)
Message 3 of 10
(4,899 Views)
It occurred to me after I posted that I could use the MATLAB "imresize" function inside a MATLAB Script Node, which is probably less complicated than what I was proposing.

But anyway, I was looking for a way to shrink the image rather than expand it, so I'm not expecting the pixels to be stretched - reducing the size of the image would selectively remove pixels and possibly even recolour other pixels in such a way to minimize the impact of the missing pixels.  Would scaling a textured object in a 3D Picture Control do anything like that?
0 Kudos
Message 4 of 10
(4,897 Views)
I bet you missed my post above 😄
Chilly Charly    (aka CC)
Message 5 of 10
(4,895 Views)
Indeed I did. 😉

@chilly charly wrote:
Did you notice that the picture control has a very nice zoom function that accepts real numbers ? Just create a property node (right click on the picture terminal > create > Property node...).
That way you shoud be able to scale your image up or down at will.

Message Edité par chilly charly le 05-12-2008 05:26 PM

Wow!  No, I did not notice that.  Why isn't it accessible any other way!?
0 Kudos
Message 6 of 10
(4,891 Views)
Chilly charly,

Thanks for pointing that out. I am trying to create a little program that demonstrates the existence of that property node (Will post it here once I am done). I will also create a knowledge base this. Once again, thank you for pointing this out. 

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 7 of 10
(4,844 Views)

Dear Sir,

I also have a problem with 3d picture control which I guess would fit to the same category.

I'm using 3d picture control to show a moving racket. which is connected to the labview using daqmx. So I have the racket movement on the projector. But it is not in the real scale. I mean for example when I move the real racket for 20cm the projection on the screen moves for 5cm!!

I want this to be the one to one equal mapping.

Could you please help me on that.

 

Thanx.

Amir
0 Kudos
Message 8 of 10
(4,392 Views)

ballbouncing:

 

The zoom feature that chilly charly mentioned was for the picture control. For a 3D picture control, your best bet is to simply increase the zoom on your object until its size and movement more closely match the real thing.

 

The movement correspondence will also depend on the size of your screen. Since you are projecting it, you may also be able to simply move the projector back use its image zoom function to make the image larger on the screen.

Caleb Harris

National Instruments | http://www.ni.com/support
0 Kudos
Message 9 of 10
(4,369 Views)

 

It is feasible, to some extent. I experimented with presenting an animation on a plane. It turned out to be too slow for animation, but works for single pictures. Interpolation leaves something to be desired though.

 

Zooming seems nice for large pictures, as was pointed out. Maybe one of the interpolation functions works for increasing the size.

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 10 of 10
(4,116 Views)