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?

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
LabVIEW Champion . Do more with less code and in less time .
Attachments:
rotateCircularMask.png ‏150 KB

Similar Messages

  • Animation in illustrator cs4: pan & rotate across large image while animating text?

    Hi there -
    I have a fairly large circular starmap image - it's a fantasy piece simulating an ancient painted star map with stars, ancient constellation figures, and calligraphic text. Basically a bitmap background from PShop, vector layers with stars, constellations and text. I want to export from Illustrator to Flash a number of short 'movies' of different views of this artwork panning from one point to another with possible zoom and rotation around the image as it pans. I also want to animate one or more of the constellation shapes as the movie pans, as well as adding momentary effects to some of the text.
    I'm familiar with setting up a non-panning animation in illustrator using layers as animation 'cells' and exporting to Flash. But is it possible to do this while moving across a large piece of artwork? How can I capture and export a specific 'view' which moves across the larger image and/or zooms in or out, while also animating a shape or text glow for example? Would this be accomplished with a mask set to the aspect ratio of the final movie which is moved/resized/rotated from layer to layer?
    Is this even possible in Illustrator CS4? I'm not familiar with Premier or AE, hoping to stay within Illy and Flash.
    Thanks!

    Thanks Monica,
    After researching, it looks like Sony Vegas can be used to create a freeflowing video 'fly-over' of the artwork. And then at specific points I can import and animate the Illustrator vector pieces with After Effects - just a 'bit' of a learning curve now...

  • How to rotate a thumbnail image in Finder?

    Is there a way to rotate a thumbnail image in Finder? When I click a photo in a Finder folder, the image automatically opens in Preview and the image is correctly displayed right side up. But the thumbnail image is displaying a vertical photo horizontally. Can I rotate the thumbnail?

    corelle,
    please open the sidebar of the Preview window and check how the thumbnail is displayed there.
    If the orientation is wrong in the Preview sidebar as well, then apparently some program rotated the image but not the EXIF preview image, which is obviously not a good thing.
    If the orientation is correct in the Preview sidebar, but wrong in the Finder, then the file probably has a custom icon with wrong orientation. This should then be removed rather than rotated. It's useless anyhow because Snow Leopard's Finder can better use the EXIF preview image instead.

  • Controlled rotation of an image

    Hello all
    Is there any way in FCP to control the rotation of an image.
    The project I'm currently working on requires me to rotate a photoshop image continuously. The image is of a pattern that has a hole cut out in the middle. The hole will allow the layers under need it to show through.
    I need the graphic to spin at about 1 turn every 2 seconds throughout the duration of the movie.
    Does anyone know of a simple method of doing this or do I need to start buying filters.
    I look forward to hearing from someone soon.

    This is easily achieved in the Motion tab on the Viewer window.... simply add a key frame at your start point, move the playhead forward to however many seconds the clip last, then enter a value of X x 360 (where X is the number of seconds the clip last, divided by 2), and a key frame will add automatically.
    ie - your graphic clip last 10 seconds
    put the playhead at the start and add a keyframe on 'Rotation' (in the Motion tab)
    move the playhead forward to the end (10 seconds)
    10 divided by 2 is 5, 5 x 360 =1800
    put 1800 as a value in the Rotation setting.
    job done.

  • Size and rotate a background image

    I would like to have a background image that rotates different images when the page is refreshed and sizes with my page. I believe I have a handle on the sizing part but I can't figure out how to make the images rotate. I would like the images to go in a particular order instead of random if that's possible.
    This is what I have so far:
    <head>
    <title>Stretched Background Image</title>
    <style type="text/css">
    /* Remove margins from the 'html' and 'body' tags, and ensure the page takes up full screen height */
    html, body {height:100%; margin:0; padding:0;}
    /* Set the position and dimensions of the background image. */
    #page-background {position:fixed; top:0; left:0; width:100%;;}
    /* Specify the position and layering for the content that needs to appear in front of the background image. Must have a higher z-index value than the background image. Also add some padding to compensate for removing the margin from the 'html' and 'body' tags. */
    #navbar {position:relative; z-index:1; padding:10px;}
    #content {position:relative; z-index:2; padding:10px;}
    </style>
    <!-- The above code doesn't work in Internet Explorer 6. To address this, we use a conditional comment to specify an alternative style sheet for IE 6 -->
    <!--[if IE 6]>
    <style type="text/css">
    html {overflow-y:hidden;}
    body {overflow-y:auto;}
    #page-background {position:absolute; z-index:-1;}
    #content {position:static;padding:10px;}
    </style>
    <![endif]-->
    </head>
    <body>
    <div id="page-background"><img src="stretchPix2.jpg" width="100%" alt="Smile"></div>
    <div id="navbar">
    <h2><img src="TestNavArt.gif" width="900" height="30"></h2>
    </div>
    <div id="content"><font color="#FFFFFF"> more test here?</font></div>
    </body>
    </html>
    If anyone can give me some insight into making the background image rotate I would greatly appreciate it.
    Thanks,
    Dave

    Hi
    The only reliable way to rotate a background image is using css3 but as this feature is only implemented in 1 browser, (and that is in beta)? There are a few javascript frameworks that claim to do this, but in testing I have not found one that is even 50% reliable.
    PZ

  • Rotate a bob image

    hi,
    I need to rotate a blob image and place it on a JLabel. can anyone help me to do that. it is really urgent
    thx in advance

    Don't multi post! One thread is enough! Locked. I'll delete this later.

  • Scale and rotate a tiff image

    How do you scale and rotate a tiff image without running out of memory?
    I have been trying to scale the image and rotate it before i pass it to the DisplayJAI but i keep running out of memory.
    code i use to rotate the image.
    private Image rotateImage(boolean rotateRight)
    Image img = imageHolder.getInUseImageIcon().getImage();
    Image rot = null;
    int imageWidth = imageHolder.getInUseImageIcon().getIconWidth();
    int imageHeight = imageHolder.getInUseImageIcon().getIconHeight();
    int buffer[] = new int[imageWidth * imageHeight];
    int rotate[] = new int[imageWidth * imageHeight];
    try
    MediaTracker tracker = new MediaTracker (this);
    tracker.addImage (img, 0);
    tracker.waitForAll();
    PixelGrabber grabber = new PixelGrabber(img, 0, 0, imageWidth, imageHeight, buffer, 0, imageWidth);
    try {
    grabber.grabPixels();
    catch(InterruptedException e) {
    e.printStackTrace();
    if(rotateRight)
    for(int x = 0; x < imageWidth; x++)
    for(int y = 0; y < imageHeight; y++)
    rotate[(x*imageHeight)+y] = buffer[((imageHeight-y-1)*imageWidth)+x];
    else
    for(int y = 0; y < imageHeight; y++)
    for(int x = 0; x < imageWidth; x++)
    buffer[(y*imageWidth)+x] = rotate[((imageWidth-x-1)*imageHeight)+y];
    for(int y = 0; y < imageHeight; y++)
    for(int x = 0; x < imageWidth; x++)
    rotate[((imageWidth-x-1)*imageHeight)+y] = buffer[(y*imageWidth)+x];
    rot = createImage(new MemoryImageSource(imageHeight, imageWidth, rotate, 0, imageHeight));
    catch (Exception e)
    e.printStackTrace();
    return rot;
    this is the code i use to scaled the image.
    Image scaled = originalImage.getImage().getScaledInstance(
    (int)(currentWidth * 1.5),
    (int)(currentHeight * 1.5),
    Image.SCALE_FAST);
    I tried this method, it works and does what i want but the scrolling and loading is too slow.
    public void paintComponent(Graphics g)
    Graphics2D g2D = (Graphics2D)g;
    g2D.rotate(Math.PI/2, (int)dimension.getWidth()/2, (int)dimension.getHeight()/2);
    g2D.drawImage(image, 0,0,(int)dimension.getWidth(), (int)dimension.getHeight(), this);
    Help plss.

    Nvm got the answer :)

  • Flip and rotation on an Image

    Hello,
    I would like to perform flip and +/-90� rotation on an image but after a rotation, the flip is performed in the wrong direction my code looks like this :
    /*axis at the center of image*/
    g2D.translate(width/2,height/2);
    g2D.scale(-1,1);
    g2D.rotate(Math.PI);
    /*image orientation correction*/   
    g2D.scale(1,-1);
    /*rotation and flip*/     
    g2D.rotate(flipHorizontal*flipVectical*Math.toRadians(angle));
    g2D.scale(flipHorizontal,flipVectical); //1 or -1
    /* drawing the image */   
    g2D.drawImage(imageToDraw, centreToX,centreToY, null);
    // than positioning the axis back to origine I've tried to say that if the image as already been rotated then invert the flips, but in that case, after one flip the rotation is performed in the wrong direction...
    Does anybody know how to solve this problem???
    Thank you in advance.

    i have to rotate, flip & scale an image , but it get misplaced when rotated on 90 and -90 please help me public void putImage_buffer(String s,int x,int y,int width,int height,double rotation,int xScale,int yScale,boolean hFlip,boolean vFlip) {
              int Rwidth=width;
              int Rheight=height;
                    try{
    ImageInputStream imageInput = ImageIO.createImageInputStream(new FileInputStream(filename));
                it = ImageIO.getImageReaders(imageInput);
                reader = (ImageReader) it.next();
                reader.setInput(imageInput);
                objBufimage=reader.read(0);
    }catch(Exception e){System.out.println(e);}
              System.out.println("width : height! ratation"+width+" : "+height+"  : "+rotation);
            if(width==0&&height==0){
                offscreen.drawImage(objBufimage,0,0, null);      
             else{
                   if(!(vFlip||hFlip)){
                        if(rotation==90)
                             Rwidth=height;
                             Rheight=width;
                             System.out.println("!(vFlip||hFlip) 90");
                        if(rotation==-90 )
                             rotation=270;
                             System.out.println(" -90 !(vFlip||hFlip");
                             Rwidth=height;
                             Rheight=width;
                   if(vFlip )
                        if(rotation==90)
                             hFlip=!hFlip;
                             vFlip=!vFlip;
                             //Rwidth=height;
                             //Rheight=width;
                             System.out.println("width : height 90 vFlip");
                        if(rotation==-90)
                             hFlip=!hFlip;
                             vFlip=!vFlip;
                             //Rwidth=height;
                             //Rheight=width;
                             rotation = 270;
                             System.out.println("width : height -90 vFlip");
                        if(rotation==180)
                             System.out.println("width : height 180 vFlip");
                   else if(hFlip )
                        if(rotation==90)
                             hFlip=!hFlip;
                             vFlip=!vFlip;
                             System.out.println("width : height 90 hFlip");
                             //Rwidth=height;
                             //Rheight=width;
                        if(rotation==-90)
                        {     rotation=270;
                             hFlip=!hFlip;
                             vFlip=!vFlip;
                             Rwidth=height;
                             Rheight=width;
                        if(rotation==180)
                             System.out.println("width : height 180 hFlip");
                   if(vFlip && hFlip)
                        if(rotation==90)
                             System.out.println("width : height 180 hFlip&&vFlip 90");
                        if(rotation==-90)
                             rotation=270;
                             System.out.println("width : height 180 hFlip&&vFlip -90");
                AffineTransform tx = new AffineTransform();
                AffineTransform origTransform = offscreen.getTransform();
                   System.out.println("hFlip:vFlip Math.PI "+hFlip+" : "+vFlip);
                   rotation=rotation*(hFlip?-1:1)*(vFlip?-1:1);
                   rotation = Math.toRadians( rotation );
                   AffineTransform rotate=AffineTransform.getRotateInstance(rotation, Rwidth/2d, Rheight/2d);
                   AffineTransform moveToImageCenter=AffineTransform.getTranslateInstance(Rwidth/2d, Rheight/2d);
                   moveToImageCenter.concatenate(AffineTransform.getScaleInstance(hFlip?-1:1,vFlip?-1:1));
                   moveToImageCenter.concatenate(AffineTransform.getTranslateInstance(Rwidth/-2d, Rheight/-2d));
                   AffineTransform flip=moveToImageCenter;
                   AffineTransform transformer = AffineTransform.getTranslateInstance(x,y);
                   offscreen.setTransform(transformer);
                                  offscreen.transform(rotate);
                   offscreen.transform(flip);
                   offscreen.drawImage(objBufimage,0,0,Rheight,Rwidth,null);
                   //offscreen.drawImage(objBufimage.getScaledInstance(width,height,objBufimage.SCALE_DEFAULT),0,0,width,height, null);
                   offscreen.setTransform( origTransform );
         }i get vFlip if hFlip+90or-90 and i get hFlip if vflip +90-90 means if actual flipping is vflip+90/-90 my method parameter gets hFlip +/-90 thats by i'm changing values

  • Why rotated rectangle tool can't draw rotated ROI on image?

    I want to use the tool window to draw a rotated rectangle on image, but each time, it seems only draw a rectangle, it can't rotate. Don't know why?
    In Vision Assitant, if I use rotated rectangle tool, it will show like this:
    Using the cross lines in rectangle, I can rotate my ROI, it is OK.
    Run the sample code: C:\Users\Public\Documents\National Instruments\CVI\samples\Vision\2. Functions\Geometric Matching, change     imaqShowToolWindow (FALSE);
    to  imaqShowToolWindow (TRUE); 
    on line 93#. Compile then run. Seems I also can't rotate my ROI, don't know why?
    Please show me? Thank you. 

    Hi,
    You cannot perform action on an overlay. In order to achieve what you want to do, I suggest you to use the ROI property in an image property node. Then just pass your ROI coordinates, the ROI will be updated automatically whenever your coordinates changes. You can drag a ROI this is impossible with an overlay.
    Regards

  • Rotate part of image

    Hi,
    Total newbie here, so apologies for if this is very basic. How do I select and rotate by degrees part of an image and not just the image as a whole? Many thanks in advance. Ciaran

    Hi Ciaran,
    With your image open, you could use any of the selection tools to make a selection and then rotate that selection only.
    1. I chose the Elliptical marquee tool and dragged a circular selection onto my image.
    2. When you have your active selection (with the little marching ants), switch to your Move tool (basic black arrow), be sure that you have Show Transform Controls checked in the top menu. This will show you the small, square handles around your selection so that you can rotate it.
    3. Position your cursor around one of the corner handles until you see bent arrow, click and rotate the selection!

  • Still getting a warped effect when rotating a still image in Premiere

    Hi all,
    I'm trying to rotate a perfectly round object in Premiere 6 on Windows 7.
    First of all, I am now importing this round object in a square PSD file layer and setting it to "Maintain Aspect Ratio" under "Clip>Video Options".
    When  this perfectly round object in a perfectly, numerically square PSD file is set to sit still or to move laterally or vertically, it  stays round, but when I put a rotate motion on it in the Motion Settings  dialog box, I end up with an oblong, horizontally elliptical spinning  image in my rendered video.
    Is there a way to fix this besides trying (virtually impossible) to compensate for the distortion with the "Distortion" control in the Motion Settings dialog box?
    Previously, someone else on this forum answered a similar question this way...
    "Remember, Premiere Rotates on the rectangular Frame, and not by an object in that Frame."
    So I thought if my imported PSD layer is square, fitting the proportions of my  circular object that I am rotating, then it will hold on to its circular  shape when rotated, as opposed to making my PSD size rectangular to fit  the movie format... but I tried importing a perfectly and numerically square PSD that perfectly fits the proportions of my perfectly and numerically round object and I still get an oblong, warped rotating image in my final rendered AVI file.  But the rotating image does appear to stay round when I preview the project in the monitor window by holding down on the ALT button a dragging (scrubbing) the cursor along the timeline.
    I can see that the round object that I am rotating becomes horizontally oblong and oval shaped when it hits the 90 degree, three o'clock position, then becomes perfectly round again when it hits the 180 degree, six o'clock position, then becomes horizontally oblong and oval shaped again at the 270 degree, nine o'clock position, then becomes perfectly round again at the 360 degree, twelve o'clock position.
    This would indicate that if I try to compensate for this strangeness by altering my original round PSD file object to be a vertically elliptical shape to compensate, then it would be vertically oblong at the zero degree, 180 degree and 360 degree positions, meaning the twelve and six o'clock positions.
    Is there a way to correct or compensate for this odd behaviour in Premiere 6?
    Thanks for any input,
    digi

    https://support.apple.com/kb/TS1713
    try this, best I can do

  • How can I rotate a screen image on a peripheral monitor?

    I have a MacBook that runs OS 10.5.8.  I bought a Samsung monitor for it that rotates 90 degrees so that I could use certain very large files.
    The last time I used the MacBook, I used it with  the image rotated 90 degrees (so that the screen is about 3 times as tall as it is wide), as I planned to. 
    Since then, because of my job, I have been using a Windows OS laptop  exclusively when I've used the Samsung monitor.  It worked fine, and in fact although I wanted to try to use the Samsung with the Dell Windows OS with the rotation, I found that I could not do so, because the Windows OS would not support the rotation.
    I have now returned the Dell laptop after transferring all my files to my MacBook.  Today I connected the MacBook to the Samsung for the first time, and was stunned to see the Mac screen appearing at the 90-degree rotation.  No matter what I do, I can't figure out how to restore it.  So I have this huge monitor and basically it's showing me the same screen size as I have on my laptop.  When I change the resolution, it just gets distorted.  And nowhere can I find out how to rotate the image back to landscape.
    Online, the only instructions I have found refer to a Preferences Panel in the Displays section of the System Preferences which allows you to choose a rotation.  However, I can't locate that panel.  I tried to find it through Spotlight, using the word "rotate," and here's what came up:
    It lists "Displays" as one of the first two hits
    But when I click on that, I get the "Displays" window labeled "Color LCD"
    And that window is obscured by a smaller window that says the following: 
    The Geometry tab of Displays preferences is hidden because this display does not have
    geometry controls.
    Which is insane, since the reason that my display is now set at 90-degrees is that I did the rotation while using this MacBook.
    If anyone can help me get this resolved, I would be very grateful.
    Thanks.

    Click the gear button on the clip and select Cropping & Rotation.
    There are rotation buttons at the top of the viewer.

  • Jagged Edges after rotating a stroked image

    I've have this problem a lot but I guess I'm just now getting around to ask about it.
    When I have a  photo in cs2-cs3-cs4 etc and I rotate it at an angle I get fine jagged edges all along the sides. It's becomes very pronounced in a stroked image even when I I stroke the image after rotation. The problem is more obvious when the image is not at angles like 45 or 90 degrees but more visible at in between angles.
    Any suggestions?

    ryanroy.roy wrote:
    I've have this problem a lot but I guess I'm just now getting around to ask about it.
    When I have a  photo in cs2-cs3-cs4 etc and I rotate it at an angle I get fine jagged edges all along the sides. It's becomes very pronounced in a stroked image even when I I stroke the image after rotation. The problem is more obvious when the image is not at angles like 45 or 90 degrees but more visible at in between angles.
    Any suggestions?
    What you are seeing is alaising, and it is inherent in raster graphics when the line to be shown is not parallel to the columns or rows of the image.It can be mitigated to some extent by antialaising, which softens the edges of the diagonal lines. When you select all of an image and stroke for a border, antialaising is used. With the polygonal lasso tool, you can turn antialaising on or off. Alaising is less apparent with very high resolution, but it can't be elilminated.
    Here are triangular selections with antialaising turned on and off:

  • Can images placed in a slideshow be zero spaced to appear as a rotating strip of images?

    I'd like to make a slideshow of images without spacing between the images to make a continuously rotating slideshow strip of images. Is that possible with Muse?

    Hi Kenneth,
    Use a basic slideshow with vertical transition. By default it has 0 spacing between the images.
    - Abhishek Maurya

  • Iphoto 9.6 rotation of grayscale images

    If I import grayscale images into iPhoto 9.6 (under Yosemite, in this case) (either Tiff or JPEG, 8- or 16-bit), iPhoto corrupts the images if I rotate them in iPhoto.
    To see it happen, I merely:
         Create a grayscale image (I use vuescan, but it will also happen if I save an image out of Photoshop CS6 as grayscale).
    Import it into iPhoto 9.6
    Rotate it (command-R).
    Now either toggle between thumbnail and full-size view or edit the image (again, I use photoshop here).
    The resulting image will be corrupted (probably either all-black or all-white, but it can show up other ways as well).
    Anyone else have this problem? The workaround is to import RGB files, but of course that's not ideal if your source files

    Thanks, Leonie; these are indeed taken with a photographic camera, but are single-channel. Previous versions of iPhoto have had complete support for grayscale images, and this version attempts to do the rotation but corrupts the image, so I interpret that behavior as a bug, rather than one of no support.
    Have you really been able to work with single channel gray scale images?  I know, that iPhoto and Aperture can work with gray scale images, as long as the gray scale is part of the color profile or an EXIF tag, but at least in Aperture you cannot do much with single-channel images, other then import and export them, or view them. The same goes for PSD files, or any file format with alpha channels and layers. As soon as transparency is involved, it cannot even be displayed correctly. That is even mentioned in the technical specifications. http://www.apple.com/aperture/specs/
    Aperture maintains but does not display layer and alpha channel information in PSD files.
    I suspect, that iPhoto has the same limitations, because both applications are sharing code and the unified photo library format.

Maybe you are looking for

  • Ever since I have got CS6, many of the programs do not even load before crashing. Anyone else?

    Premiere, Audition and Photoshop of this suite crash many times even before they fully start. I have all updates. I have 64 bit system with a Nvidia Quadro 600 video card. CS5.5 seems to work better with the same programs. What can it be that causes

  • PC Suite Backup failed to backup contacts

    Went to update my firmware today, and it said that it would delete all contents on my phone. So, I updated PC Suite, and then clicked the backup button. It appeared to be successful. I then had it install the firmware update. After that successfully

  • Unzip CS5 download. How?

    Unzip CS5 download. How? Its in z7 format...

  • Roll over Effekt mit Statusänderung

    ich habe einen roll over effekt erstellt mit dem wechsel von status 1 zu status 2 sobald man mit der maus darüber geht. das funktioniert auch gut -aber wie kann ich dem status 2 mehr symbole zuordnen zum beispiel mehrere grafiksymbole die auch zeitve

  • Sales Order Item Change Date and delta flag

    is there a field for Sales Order Item Change date in MC11VAOITM? Also is there a flag that tell if a record is a delta or not once it is extracted to BW?