Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Bypp · Jun 09, 2014 at 09:26 PM · ioswebcamtexture

WebCamTexture iOS blurry snapshot

I am currently using the WebCamTexture class to display live camera feed until the user takes a snapshot, and then I use said snapshot as a Texture in my app.

Here's the code I'm using at the moment :

 private WebCamTexture cameraTexture;
 private Texture2D snapshot;
 public UITexture webCamTexture;

 snapshot = new Texture2D(cameraTexture.width, cameraTexture.height);
 snapshot.SetPixels(m_CameraTexture.GetPixels());
 snapshot.Apply();
 webCamTexture.mainTexture = snapshot;

Note : The UITexture class comes from NGUI, it's only to display the texture on the scene.

On Android devices, there appears to be no problem. However, when I use this on iOS devices (tested on iPad2 and iPad3), the texture instantly becomes blurry when I set it. Is this a focus problem ?

I've tried a couple things, mainly waiting for the end of the frame before taking the shot and calling cameraTexture.Pause() before getting the pixels, to no avail.

Why does the iOS texture become blurry ?

Comment
Add comment · Show 4
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
avatar image Bypp · Jun 10, 2014 at 07:50 PM 0
Share

Done some further testing. Apparently the maximum supported resolution by Unity is 1280x720, don't know if this does anything because the device I've tested on has only 1024x768 resolution... Anyone ?

avatar image Graham-Dunnett ♦♦ · Jun 10, 2014 at 08:31 PM 0
Share

What device are you testing on, what resolution is returned for the WebCamTexture by Unity, and what resolution front facing camera do you think the device has? $$anonymous$$aybe your device has a vga camera, and you are scaling that to fix the screen? That will make the video feed look blurry.

avatar image Bypp · Jun 11, 2014 at 12:51 PM 0
Share

As stated in my question, I am testing on both the iPad2 and iPad3. I am unsure about the resolution returned by Unity, but will come back to you with this once I've tested it. However, it isn't the video feed that's blurry, only the snapshot I'm taking when I Set/Get the pixels, which leads me to believe the resolution isn't the problem as the camera live feed looks decent.

avatar image saifuddinazhar · Oct 04, 2017 at 08:36 AM 0
Share

Are there another free solution using default API from Unity?

0 Replies

· Add your reply
  • Sort: 

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

26 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

Related Questions

import webcam picture in iOS 0 Answers

iPad crashed when getting videoRotationAngle from a WebCamTexture 2 Answers

WebCamTexture zoomed in on iPad Pro 1 Answer

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Webcam texture not rendering on iOs URP 1 Answer


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