LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rotate an image

Hi,

I have overlaid two image over a continous image coming from camera. I want to rotate the overlaid image by the amount of degrees i specify. I have attached files. 


0 Kudos
Message 1 of 11
(6,996 Views)

Hi NapDynamite,

 

were you looking for something like this:

http://zone.ni.com/reference/en-XX/help/371361J-01/gmath/2d_cartesian_coordinate_rotation/

 

?

 

Unfortunately, I can't look at your project, as I don't have IMAQ on this machine.

 

 

Regards,
Alex

0 Kudos
Message 2 of 11
(6,975 Views)

While I know and understand the math behind rotations, I'd hesitate before trying to write an Image Rotation algorithm because of the need to "mix" pixels.  Fortunately, there's an IMAQdx function IMAQ Rotate Front Panel that might do the trick for you [I've not used it, myself].

0 Kudos
Message 3 of 11
(6,963 Views)

Hi Bob,

I have tried using IMAQ rotate for this purpose, but it just messes up the whole overlaid picture. I think I need more brainstorming because I guess it won't rotate unless I play with the pixels and try to change thier positions ( just spit-balling). Meanwhile, please have a look at my VI and if you hit some bright idea, pleas elet me know. Help would be much appreciated. 🙂

 

 

Regards.


0 Kudos
Message 4 of 11
(6,954 Views)

Hi Bob,
I have attached a VI. Just select any image to overlay, change angle of rotation to 1 degree and see what happens. Instead of just rotating 1 degree, it complete the whole circle and the overlaid image gets messed up. Please take a look.

Regards.


0 Kudos
Message 5 of 11
(6,949 Views)

@NapDynamite wrote:

Hi Bob,
I have attached a VI. Just select any image to overlay, change angle of rotation to 1 degree and see what happens. Instead of just rotating 1 degree, it complete the whole circle and the overlaid image gets messed up. Please take a look.

Regards.


A couple of points.

  • The VI you attached takes data from a camera and an unspecified external image.  I see no "rotate image" function -- did you send the wrong VI?
  • A good idea when trying to figure out a new technique is to write a really small, really simple VI.  Start with a known image file.  Read it in.  Try a Rotate Image, and display the result.  Do you like what you see?  [I haven't done this, myself ...]
  • I'm curious why you end your requests for help with "Kudos are always appreciated".  You generally ask for a Kudo when you provide an answer (or help, as I am doing), not when you ask for help.  You should be giving kudos, not asking for them.  [Maybe I just don't get something here ...]
0 Kudos
Message 6 of 11
(6,942 Views)

Hi bob,

Sorry, that was juat a signature I use. Removed it 🙂


I have attached the VI again; I previously forgot to save it. 

 

 

 

Regards.

 


0 Kudos
Message 7 of 11
(6,938 Views)

Hi bob,

Sorry, that was juat a signature I use. Removed it :smileyhappy:


I have attached the VI again; I previously forgot to save it. 

 

 

 

Regards.

 


0 Kudos
Message 8 of 11
(6,937 Views)

@Bob_Schor wrote:

While I know and understand the math behind rotations, I'd hesitate before trying to write an Image Rotation algorithm because of the need to "mix" pixels.  Fortunately, there's an IMAQdx function IMAQ Rotate Front Panel that might do the trick for you [I've not used it, myself].




 

good argument, as we don't have infinite resolution, artifacts are bound to occur. I didn't take this in consideration.

 

2.png

 

When reducing the resolution to 50 % of the input image, artifacts may be avoided:

1.png

 

 

but I guess this is not a favorable option.

 

 

Regards,
Alex

 

 

0 Kudos
Message 9 of 11
(6,918 Views)

Hi Alex,
Could you pass me the VI you made?


0 Kudos
Message 10 of 11
(6,876 Views)