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
1
Question by MartinCA · Jan 10, 2012 at 11:48 AM · androidframeratewebcam

Unity 3.5 webcam framerate question

Hello everyone, I'm having somewhat of a problem using the new WebCamTexture feature in Unity3.5.

I have implemented a webcam in a Win32/Android app, and it works seamlessly on both platforms. However, I am only able to receive frame updates at around 7~8 frames per second using both a generic built-in laptop webcam on the PC and the back facing camera on the Android Galaxy S2 in a well lit scene. This seems to be the case when initializing the camera at 320x240 or 160x120 (The Galaxy S2 lowest native resolution is actually a bit higher - 177x140 I think?), and both when setting the target FPS to 30 and when leaving it out which should default to highest framerate available).

Now, I assume there is a slight overhead converting the camera stream into a Texture2D object, however, is it that influential? Is it a Unity3d related issue or hardware?

Also, are there any cross-platform alternatives for reading a video stream at a low resolution high framerate? I don't need to actually display the image as a texture, but rather do some image processing, right now I'm converting from Texture2D Colors32 format to raw bitmap data for processing which creates another overhead.

Finally, if this problem cannot be handled at Unity's level, what would be good library choices for accessing a camera input at ~160x120@30fps? OpenCV? DirectShow? DirectShow(dot)Net?

Any pointers are highly appreciated :)

[edit:] DirectShow dot Net was automatically converted to link :/

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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Unity game on Android capped at 30 fps 1 Answer

WebcamTexture not refreshing 0 Answers

Very Bad Performance on Android 3 Answers

WebCamTexture.devices.Length returning 0 in Unity 2020.3.8f1 0 Answers

Android framerate increases a little when I put my finger on the screen. What? 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