Announcement

Collapse
No announcement yet.

Laptop webcam image is upside down

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Laptop webcam image is upside down

    My laptop webcam image (in XawTV, at least) is upside down. I know this is a common problem, but I haven't seen a solution for this (Kubuntu 10.04) environment. I had the same problem with Windows on this machine, but I solved it there by replacing the driver. I don't see that I have that option here.

    #2
    Re: Laptop webcam image is upside down

    First, this is a known bug and will probably never be fixed for reasons explained in that link.

    The guvcview application has a video filter called "invert" which inverts the webcam image. For taking pics and making movies it is the best app available. For Skype and similar apps other things need to be tried.

    The problem exists on Asus boxes and some HP boxes. Probably others too. There are known workarounds for SOME systems. XawTV uses the libv4l driver. The easiest to try is:
    echo 1 >/sys/class/video4linux/video0/vflip
    IF that works you can make it permanent by putting that line in /etc/rc.local

    If that doesn't work, and you are using the uvcvideo module, it may be that vflip doesn't exist in your /sys/class/video4linux/video0/ directory or in your /sys/module/uvcvideo/parameters/ directory. But, uvcvideo does have the "quirks" and "trace" parameter files. Removing the uvcvideo module (sudo modprobe -r uvcvideo) and reloading it:
    modprobe uvcvideo quirks=vflip=1 trace=vflip=1
    may invert your image. Sudo depmod -a will make it permanent. If it doesn't then remove it and modprobe it without the parameters to restore the orginal settings.

    For those using uvcvideo there is a more technical solution, given here, and another one give here.

    IF your webcam uses the stk11xx kernel module you can see what your options are:
    modinfo stk11xx
    If it shows the vflip option you can unload the driver and then re-load it with the vflip option:

    sudo modprobe -r stk11xx
    sudo modprobe stk11xx vflip=1

    Now try your applications. If that has solved the issue you can add the option to the system settings so the driver always uses it when it loads:
    echo "options stk11xx vflip=1" | sudo tee -a /etc/modprobe.d/options
    For those mechanically inclined there is always the option of disassembling the lid of your laptop and turning the webcam over, IF that is possible.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      What was Asus thinking?

      I wonder what Asus was thinking when they set up their laptop webcams to behave that way. This isn't just a Linux problem; as I mentioned earlier, I encountered it in Windows also. The particular circumstances might be enlightening. My laptop is a refurbished model, and part of the refurbishment was replacing the built-in Vista by Windows 7. Asus told me how to get a corrected Windows driver, but why was the correction needed in the first place?

      By the way, cheese also inverts the image.

      Comment


        #4
        Re: What was Asus thinking?

        Originally posted by pwabrahams
        ...but why was the correction needed in the first place?
        The webcam, in all reality, was accidentally mounted upside down. XD They just goofed big time.

        (I'm a user of an Asus laptop that was affected until just recently)

        Comment


          #5
          Re: Laptop webcam image is upside down

          Did any of that info help solve your problem?

          A friend of mine has an HP that gives an inverted image in Linux, but not in Windows.
          I check Google and found that it has been that way with that model for over two years. Just couldn't be bothered to have the people/machines put the chip in the right way?
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Re: Laptop webcam image is upside down

            same problem with my laptop. asus A52N.

            i first tried: echo 1 >/sys/class/video4linux/video0/vflip
            but vflip was not present
            so i tried: modprobe uvcvideo quirks=vflip=1 trace=vflip=1
            after doing this.. i tested the video input of skype. still inverted.
            to undo the above thing.. i typed the command:
            Code:
            modprobe uvcvideo quirks trace
            i hope that was correct.
            what do i do next to solve the problem?

            Code:
            kapil@kubu:~$ lsmod | grep video
            uvcvideo        62379 0 
            videodev        49359 1 uvcvideo
            v4l1_compat      15519 2 uvcvideo,videodev
            v4l2_compat_ioctl32  12486 1 videodev
            video         22176 0 
            output         2527 1 video
            bTw..guvcview is indeed a very good app.. thanks GG
            asus A52N
            Dual boot: Kubuntu 11.10 64bit, Ubuntu 11.10 64bit
            AMD Athlon II 64 X2 | 4 GB DDR3 RAM | ATI Radeon HD 4200
            windoze free since 2009 12 16 (Vijay din= Victory day)

            Comment


              #7
              Re: Laptop webcam image is upside down

              You could try the solution found here, but it may not work with a uvcvideo based webcam. Other than that the next step would be to install the kernel source and download the uvcvideo.c program and compile it specifically for your Asus. http://developer.berlios.de/projects/linux-uvc
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                Re: Laptop webcam image is upside down

                Thanks GG.
                I tried the first solution. Video is still inverted in both guvcview and skype.

                and the second one i m pretty scared to do. what if something goes wrong..
                asus A52N
                Dual boot: Kubuntu 11.10 64bit, Ubuntu 11.10 64bit
                AMD Athlon II 64 X2 | 4 GB DDR3 RAM | ATI Radeon HD 4200
                windoze free since 2009 12 16 (Vijay din= Victory day)

                Comment


                  #9
                  Re: Laptop webcam image is upside down

                  Originally posted by kapil
                  Thanks GG.
                  I tried the first solution. Video is still inverted in both guvcview and skype.

                  and the second one i m pretty scared to do. what if something goes wrong..
                  That was only a suggestion. If you are not comfortable in attempting it I wouldn't do it. Also, if you took that route, you'd have to repeat it for the kernel and dkms every time the kernel was updated.

                  Besides taking the lid apart and rotating the camera physically, you can attach a small magnifying lens to the front, with an appropriately sized tube so the focal point falls on the CCD.
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    Re: Laptop webcam image is upside down

                    Originally posted by GreyGeek
                    ...you can attach a small magnifying lens to the front, with an appropriately sized tube so the focal point falls on the CCD.
                    @GG: you actually meant that.. or said just for fun

                    ok.. i think i will just use a guvcview in full screen mode and share my screen in skype.. that should do the trick :P
                    asus A52N
                    Dual boot: Kubuntu 11.10 64bit, Ubuntu 11.10 64bit
                    AMD Athlon II 64 X2 | 4 GB DDR3 RAM | ATI Radeon HD 4200
                    windoze free since 2009 12 16 (Vijay din= Victory day)

                    Comment


                      #11
                      Re: Laptop webcam image is upside down

                      I don't think that will work. At least it doesn't on my laptop. Skype can't share the video cam with another app, and I don't thing guvcview will either. Otherwise, it was a good idea.

                      Oh, I wasn't kidding about that small magnifying glass, or a prism image inverter.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        Re: Laptop webcam image is upside down

                        Originally posted by GreyGeek
                        Oh, I wasn't kidding about that small magnifying glass, or a prism image inverter.
                        Take up yoga instead, and start using your computer standing on your head!
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Remounting the webcam

                          This might officially be off-topic, but has anyone who encountered this problem actually looked at how difficult it is to remove the laptop's lid and remount the camera? I guess that there's no assurance that once you get at it, the physical mounting arrangements allow it to be inverted.

                          Comment


                            #14
                            Re: Laptop webcam image is upside down

                            I've repaired several laptops. The key is having the proper photos of the step-wise process. For lots of common (popular) laptops there are such photo explanations available on the Internet. I've used them. The key to determining if it is possible or not is the availability of the specific part needed to be replaced. If you can find that component on the Internet then there is a way to replace it.

                            But, alas, for the A52N I couldn't find a photo-tutorial, so it would be flying blind. IF the wire leads are long enough to allow rotation and compact enough it may be possible. BUT, if the leads are flat circuits printed on non-conducting plastic strips with connectors on them rotation is not possible. In that case what would be possible is to scrap through the appropriate leads thus creating gaps and breaking the circuit, scape a clean section of each of the four ends to create a soldering pad, then soldering cross-over wires on to the pads -- without melting the plastic. Conductive glue is also a possibility.
                            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                            – John F. Kennedy, February 26, 1962.

                            Comment


                              #15
                              Re: Laptop webcam image is upside down

                              Thanks for your efforts GG.
                              i think it is better to take software risk then the hardware operation of my brand new laptop 8)

                              just one question.. is that kernal source and uvcvideo.c thing works?.. i mean.. have that work for any of you?
                              if it does.. plz post a link to step by step procedure to do that...
                              seems like.. it is the only thing that remains to do now.
                              asus A52N
                              Dual boot: Kubuntu 11.10 64bit, Ubuntu 11.10 64bit
                              AMD Athlon II 64 X2 | 4 GB DDR3 RAM | ATI Radeon HD 4200
                              windoze free since 2009 12 16 (Vijay din= Victory day)

                              Comment

                              Working...
                              X