CameraUI - Captured image is rotated 90 degrees and zoomed in.

   Im able to capture an image....  when I add it to the stage the image is zoomed in and rotated 90 degrees.  When I try to use transform.matrix; to rotate the image...  I lose the image completely.
     Even if I set the width and height of the image when I add it to the stage the image vanishes. ?
     So ...     First problem .. doest anyone know why all photos taken are rotated 90 degrees ?
     Second ..  does anyone know why resizing the image doesnt work ?
      Third .. why is the image zoomed in ?
Cheers!

which is the code we're using now, I have also had the same problem

Similar Messages

  • Problem with capture image from wc

    hi all, i want to capture image from my webcam and play it, but it's not work
    please help me, here's code
    public class Demo extends JFrame {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              Demo demo = new Demo();
         public Demo() {
              super();
              int a=30;
              final JPanel panel = new JPanel();
              getContentPane().add(panel, BorderLayout.CENTER);
              setVisible(true);
              DataSource dataSource = null;
              PushBufferStream pbs;
              Vector deviceList = CaptureDeviceManager.getDeviceList(new VideoFormat(null));
              CaptureDeviceInfo deviceInfo=null;boolean VideoFormatMatch=false;
              for(int i=0;i<deviceList.size();i++) {
              // search for video device
              deviceInfo = (CaptureDeviceInfo)deviceList.elementAt(i);
              if(deviceInfo.getName().indexOf("vfw:/")<0)continue;
              VideoFormat videoFormat=new VideoFormat("YUV");
              System.out.println("Format: "+ videoFormat.toString());
              Dimension size= videoFormat.getSize();
              panel.setSize(size.width,size.height);
              MediaLocator loc = deviceInfo.getLocator();
              try {
                   dataSource = (DataSource) Manager.createDataSource(loc);
                   // dataSource=Manager.createCloneableDataSource(dataSource);
                   } catch(Exception e){}
                   Thread.yield();
                   try {
                        pbs=(PushBufferStream) dataSource.getStreams()[0];
                        ((com.sun.media.protocol.vfw.VFWSourceStream)pbs).DEBUG=true;
                        } catch(Exception e){}
                        Thread.yield();
                        try{dataSource.start();}catch(Exception e){System.out.println("Exception dataSource.start() "+e);}
                        Thread.yield();
                        try{Thread.sleep(1000);}catch(Exception e){} // to let camera settle ahead of processing
    }

    iTool wrote:
    hi all, i want to capture image from my webcam and play it, but it's not workThat's a very descriptive error message, "it's not work". Everyone on the board will certainly be able to help you out with that.
    The first error I see is that you're using the CaptureDeviceManager in an applet. If T.B.M pops in here, he can tell you why that's going to be a CF 99% of the time.
    The other error I see is that your code looks absolutely nothing like any working JMF webcam capture code I've personally ever seen.
    Lastly, the big one, even if you were somehow capturing video magically, you're not even trying to display it...so I'm not entirely sure why you expect to see anything with the code you just posted.
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JVidCap.html]
    Your best bet would be starting over and using the example code from the page linked above.

  • Still images stuttering on playhead and preview

    I am in Premiere Pro CC and my still images that are pans and zooms stutter to a rhythm in preview and export. I can see the played stuttering as it plays!
    Any ideas?
    Scott

    A few details on your system ... OS, CPU, RAM, GPU, and the specific PrPro version (there are five different versions between CC and 2014). Plus ... what's your disc layout, number of, connections, and what's where?
    Next ... what sort of sequence do you have, and the data on the image sizes vs the frame-size of the sequence? And what is the image type?
    Neil

  • Capturing image from Webcam

    Hi,
    Is there any way in which Java can be used to capture images from the webcam and save it to a predefined image file name?
    Any examples out there?
    Alternatively, I could have the application written in other languages, but still, I would need my main Java app to launch this external app.
    Thanks alot.

    Hi,
    Is there any way in which Java can be used to capture
    images from the webcam and save it to a predefined
    image file name?
    Any examples out there?
    Alternatively, I could have the application written in
    other languages, but still, I would need my main Java
    app to launch this external app.
    Thanks alot.Yes, the ExampleSave from the JavaTwain package at http://www.gnome.sk does this job :)
    If you just want to see how Java Twain works with your webcam (works with a scanner too):
    - java (1.2 or higher for Windows, 1.3 or higher for Mac OS X) has to be installed on your computer
    - a scanner or camera has to be installed on your computer
    - download the trial package from http://www.gnome.sk
    - unzipp it
    - go to the examples directory of the unzipped package
    - in Windows: doubleclick the runExampleShow.bat
    - in MacOS:
        - open the Terminal window
        - change the working directory to the examples
        - run .sh file (type ExampleShow.sh or sh ExampleShow.sh)
    This will pop up the Twain Source Selection user interface. There, all your scanners and cameras which do have a twain driver should be listed. (About 90% of scanners and cameras on the market do have a twain driver for Windows, only a few do have a twain driver for MacOS.) Select one of them. The user interface of the selected scanner (camera) will appear. Confirm the scanning (you can set the scanning parameters first). The scanned image will be displayed in a separate window. To end the application, close that window.
    Running different examples, you can test scanning with hidden UI, saving the scanned image, using ADF, ...
    If there is any problem, do not hesitate to inquire about it at the technical support, email: [email protected] . I am the member of the staff :)
    Erika Kupkova

  • Capturing Image HELP HELP HELP........

    Hi
    I have one problem. I have an applet and a client interactivly can make changes.
    But i want to store the changes what i have to do???
    Whether i have to capture screen or what if i have to capture screen how i will do?? But i only want to capture image not whole screen and i don't know what can be the VGA resolution.
    Can any body help me i will appreciate.

    http://forum.java.sun.com/thread.jsp?forum=31&thread=168195

  • TS4436 hi, when zooming in to capture still images, the image is really blurred and out of focus. is this a hardware issue and is there any solution for this?? or is my device faulty?

    hi, when zooming in to capture still images, the image is really blurred and out of focus. is this a hardware issue and is there any solution for this?? or is my device faulty?

    If you are using the iPhone camera zoom then remember that this is a digital zoom not an optical zoom. The zoomed in area will have fewer pixels and not appear as clear. The more you zoom the worse it gets. It's like cropping a picture after it has been taken.

  • Need help with the rotate and zoom button...

    hi, i create a Jpanel code that use for zoom in and rotate image, the rotate button work fine but the zoom in is not work by the following code, can any one tell me how to fix this?
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.util.Hashtable;
    import javax.imageio.ImageIO;
    import javax.swing.event.*;
    public class RotatePanel extends JPanel {
    private double m_zoom = 1.0;
    private double m_zoomPercentage;
    private Image image;
    private double currentAngle;
    private Button rotate1, rotate2, rotate3,zoom;
    public RotatePanel(Image image) {
    this.image = image;
    MediaTracker mt = new MediaTracker(this);
    mt.addImage(image, 0);
    try {
    mt.waitForID(0);
    catch (Exception e) {
    e.printStackTrace();
    public void rotate() {
    //rotate 5 degrees at a time
    currentAngle+=90.0;
    if (currentAngle >= 360.0) {
    currentAngle = 0;
    repaint();
    public void setZoomPercentage(int zoomPercentage)
                m_zoomPercentage = ((double)zoomPercentage) / 100;    
    public void originalSize()
                m_zoom = 1; 
    public void zoomIn()
                m_zoom += m_zoomPercentage;
    public void zoomOut()
                m_zoom -= m_zoomPercentage;
                if(m_zoom < m_zoomPercentage)
                    if(m_zoomPercentage > 1.0)
                        m_zoom = 1.0;
                    else
                        zoomIn();
    public double getZoomedTo()
                return m_zoom * 100; 
    public void rotate1() {
    //rotate 5 degrees at a time
    currentAngle+=180.0;
    if (currentAngle >= 360.0) {
    currentAngle = 0;
    repaint();
    public void rotate2() {
    //rotate 5 degrees at a time
    currentAngle+=270.0;
    if (currentAngle >= 360.0) {
    currentAngle = 0;
    repaint();
    protected void paintComponent(Graphics g) {
    super.paintComponent(g);
    Graphics2D g2d = (Graphics2D)g;
    AffineTransform origXform = g2d.getTransform();
    AffineTransform newXform = (AffineTransform)(origXform.clone());
    //center of rotation is center of the panel
    int xRot = this.getWidth()/2;
    int yRot = this.getHeight()/2;
    newXform.rotate(Math.toRadians(currentAngle), xRot, yRot);
    g2d.setTransform(newXform);
    //draw image centered in panel
    int x = (getWidth() - image.getWidth(this))/2;
    int y = (getHeight() - image.getHeight(this))/2;
    g2d.scale(m_zoom, m_zoom);
    g2d.drawImage(image, x, y, this);
    g2d.setTransform(origXform);
    public Dimension getPreferredSize() {
    return new Dimension((int)(image.getWidth(this) + 
                                          (image.getWidth(this) * (m_zoom - 1))),
                                     (int)(image.getHeight(this) + 
                                          (image.getHeight(this) * (m_zoom -1 ))));
    public static void main(String[] args)  throws IOException{
    JFrame f = new JFrame();
    Container cp = f.getContentPane();
    cp.setLayout(new BorderLayout());
    Image testImage =
    Toolkit.getDefaultToolkit().getImage("clouds.jpg");
    final RotatePanel rotatePanel = new RotatePanel(testImage);
    final RotatePanel zomePanel = new RotatePanel(testImage);
    JButton b = new JButton ("90 degree");
    JButton c = new JButton ("180 degree");
    JButton d = new JButton ("270 degree");
    JButton e = new JButton ("zoom in");
    c.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    rotatePanel.rotate1();
    d.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    rotatePanel.rotate2();
    b.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    rotatePanel.rotate();
    e.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    zomePanel.zoomIn();
    cp.add(rotatePanel, BorderLayout.NORTH);
    cp.add(b, BorderLayout.WEST);
    cp.add(c, BorderLayout.CENTER);
    cp.add(d, BorderLayout.EAST);
    cp.add(e, BorderLayout.SOUTH);
    // f.pack();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setSize(500,500);
    f.setVisible(true);
    }

    TRIPLE CROSS POSTED
    [_http://forum.java.sun.com/thread.jspa?threadID=5314687&messageID=10342105#10342105_|http://forum.java.sun.com/thread.jspa?threadID=5314687&messageID=10342105#10342105]
    Stop posting this question over and over in multiple forums please.

  • How Can I Rotate and Zoom?

    Let's say I have a circle that's a large, detailed image. I want to be able to rotate and zoom to different points on that circle. How can that be accomplished in Muse? Thanks!

    What you want to do isn't possible with just Muse if I understand what you are trying to do correctly. I am assuming you want the user to be able to rotate and zoom the image?
    If so, then Edge Animate would be the tool you need and then import that into your Muse project.

  • Help Needed in Zooming and Zooming Out Images in flex

    Hi
    I am using <mx:Zoom /> component to zoom an image!
    I am able to zoom and Zoom out the Images but when I zoomIn the Image is cropping!
    Can any one give me the link or code for best zoomin and  zoomOut for Images?
    Is there any way that I can Zoom Video in flex?
    Thanks n Regards
    Aruna

    Probably the simplest solution is to use password-based encryption (PBE). See http://java.sun.com/j2se/1.5.0/docs/guide/security/CryptoSpec.html#PBEEx
    for an example.

  • Labview IMAQ VI for capturing images and saving with incremental file names

    Hello,
    I am using LabView 7.1(IMAQ) to capture images with NI's PCI 1426 card, and a JAI CV-M2 camera. Now, with the example VI's like LL Grab, or LL Sequence, or Snap and Save to File.vi, I can capture the images. But what I actually want is to capture images continuously and keep saving them with a sequentially incrementing file name.
    I have tried to modify the Snap and Save to File.vi  by adding a 'for loop', so as to run this for required number of images. This works okay, but I can't really change the file name after every image. However, I'm not confident with this method either. I think it would be better to use the buffer itself, as is given in LL Grab.vi and somehow save images from the buffer. I think this would be faster ?
    In any case, any ideas as to how I should go about implementing auto-incrementing of the file name ?
    Any help will do. 
    Thanks.
    - Prashant

    Hi,
    Thanks a lot for replying. 
    I tried using this in the VI i was working with, but using the "build path" vi doesnt seem to work. If I use just the base path from user's input, it works, but then again it keeps overwriting the images into one file rather than giving each file a new name. I'm attaching the vi. 
    Please take a look and tell me where i'm going wrong.
    Thanks again.
    Attachments:
    LL Sequence_mod.vi ‏62 KB

  • I use to be able to rotate my iPhone and change the view of an image, Web page, email, and so on, from portrait to landscape, but after update, I cannot. I can only view in portrait mode. Anybody know what's up with that?

    I use to be able to rotate my iPhone and change the view of an image, Web page, email, and so on, from portrait to landscape, but after update, I cannot. I can only view in portrait mode. Anybody know what’s up with that?

    You need to do the basic troubleshooting steps described in the User Guide, Appendix B.
    Restart phone
    Reset phone
    Restore in iTunes using a backup
    Restore in iTunes as new, without using a backup
    If restoring as new doesn't help, there is a hardware failure in the phone that needs evaluation by Apple.

  • BBM display picture is blurry! Can not rotate and zoom. Update please

    Hi.. Please help me.. I just bought blackberry q10 but I really don't like how the BBM works. How to fix a blurry display picture on bbm? I'm using blackberry for a long time and I need to share and update my pictures to my family and my friends which are mostly live in another country... Please please fix it.... It can't rotate and zoom too... I tried all pictures to put on my display picture but still blur.. Even the picture I took from Q10 itself which is have 8mp but still blur too.. my friend asked me why my pictures always blur like i took pics with a bad quality camera.. It's not cool thank you before

    This seems to be an issue for some but not others and I haven't yet seen a resolution. It only happens with display pictures. If you send a picture via BBM it should work fine.
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • How do you pan and/zoom an image--the "Ken Burns" effect?

    How do you pan and/zoom an image--the "Ken Burns" effect?

    Frequently answered question
    Cheers
    Eddie
    Forum FAQ
    Premiere Pro Wiki
    - Over 250 frequently answered questions
    - Over 100 free tutorials
    - Maintained by editors like
    you

  • Open camera and capture image using J2me.

    please I want J2me code to open the mobile camera and capture image....
    please reply me as quick as possible....(very urgent)...

    eng_amy wrote:
    please I want J2me code to open the mobile camera and capture image....Well..
    eng_amy wrote:
    please reply me as quick as possible....(very urgent).....(checks watch) ..it's obviously too late. Never mind.

  • Zoom in and zoom to images?

    How can i zoom in and out my images to orqcle portal?
    general for images whre can i find a additional portlet?
    thanks,

    I don't know what is the correct terminology, but none of those things does what I want.  With the Content Grabber I can move the image and see where it is going and place it where I want it, and the frame does not move and is not changed in any way. I want something that does exactly the same thing with "zooming" in and out on the image.
    Shift-drag on the corners moves the frame.  In the Transform panel, in the lower box, it makes the image AND the frame larger or smaller. Neither of these is what I want.
    If I'm not using the right terminology, let me try to explain.  If I have an image that is larger than the frame, then I can only see a small part of the image inside the frame.  If I could zoom out on the image, I would then see a larger part of the image in the frame, but the frame would be exactly the same size and in exactly the same place (just like it would be when you use the Content Grabber).  If I could zoom in on the image, then I would see less of the image but in more detail.
    If I could move (like the Content Grabber) AND zoom without doing anything with the frame, then I could get the image just the way I want it inside an already-properly-placed frame in the most straightforward and simple manner, and be able to see what I was doing in the process. Dragging on the corners is basically trial and error because you have to go through several steps before you see the final result.

Maybe you are looking for