Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Joshua P. R. Pan · Aug 31, 2015 at 05:32 AM · androidwebcamtexture

[WebCamTexture] Require high resolution (1280*720) yields Green Screen

I want to use WebCamTexture to show the preview window of camera in Android Device (which has only one camera). If I use the default resolution (640*480), everything work fine.

However, If I change the resolution to 1280*720, I get the weird green-screen image (as shown in the attached file). It seems that the image from camera had been transferred to grayscale, assigned only to green value, and divided into 4-parts...

Here is my code:

     public class UnityWebCamAPI : MonoBehaviour
     {
         [SerializeField] private GUITexture displayedGUITexture;
     
         private WebCamTexture photoCamera;
     
         private void Awake()
         {
             // Initialize Camera Devices.
             this.photoCamera = new WebCamTexture(1280, 720);
             this.photoCamera.Play();
         }
         private void Start()
         {
             this.displayedGUITexture.texture = this.photoCamera;
         }

I'm using Unity 4.6.1f1. I'm sure the camera can support the 1280*720 (which has been proven by another APP written by Android API). Any ideas?

Thanks,

Joshua P. R. Pan

[1]: /storage/temp/53170-screenshot-2000-07-27-21-34-47.png

screenshot-2000-07-27-21-34-47.png (86.3 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Joshua P. R. Pan · Sep 02, 2015 at 07:14 AM

I'm sorry, it seems to be our own problem. We're not using the normal Android devices, instead we use our customized android devices which return green-screen-like image back to unity as high resolution preview required.

Joshua P. R. Pan

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

28 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Cam texture stopped working in Unity 5/Android Lollipop 0 Answers

problem accessing webcamtexture.videorotation angle on windows phone 8 0 Answers

WebcamTexture stretching too much 1 Answer

OpenCVForUnity Core.Flip function not working in Unity Android Build 0 Answers

WebCamTexture resolution and cropping problem on Android 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges