From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rotate a circular image

I would like to be able to display a circular image, which can then be rotated. The image is typically of a valve for controlling the flow of liquid. I need to be able to display its current position between 0 and 359 degrees with respect to its input/output ports. As most images are rectangular, can a image be laid onto a circular tool such as a dial so as to only display the circular section. I understand it is possible to rotate tools. I am currently using LabView 8.5.
Has anyone any experience of rotating images or masking an image for a circular representation?
0 Kudos
Message 1 of 7
(3,477 Views)

In reply #14 of the Picture Control thread Christian showed us how to rotate an image.

Rather than deal with the tedious work of masking around the circle I suggest you place a decoration with a transparent center region over the rotated image and just let the region of interest show through.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 7
(3,474 Views)


Ben wrote:

Rather than deal with the tedious work of masking around the circle I suggest you place a decoration with a transparent center region over the rotated image and just let the region of interest show through.


It's not very tedious. 🙂 Simply check for the radius and substitute the background color if a pixel is outside the circle.
 
Here's a very rough draft modification of my old VI. Modify as needed.
 


Message Edited by altenbach on 06-03-2008 06:45 AM
0 Kudos
Message 3 of 7
(3,456 Views)

 

Yeeeeshhh....

Reminds me of the first time I road out a huricane and we came up with the bright idea (NOT) of measuring the ships angle of rocking by hanging a pendulum from the ceiling. I had never been sea-sick before that or since (amusement rides excluded).

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 7
(3,448 Views)
Ben, you're  not the only one to use this pendulum idea!

Phoenix Lander - Telltale (or jokingly a weather rock)


Message Edited by pbrooks100 on 06-03-2008 09:11 AM
0 Kudos
Message 5 of 7
(3,443 Views)

Hi,

Many thanks for your suggestion I will try it. What package did you use to create a transparent centre circle?

0 Kudos
Message 6 of 7
(3,431 Views)

PowerPoint or any other package that will save as ".wmf", but first try Christian's example.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 7
(3,427 Views)