Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8086051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:19:55+00:00 2026-06-05T18:19:55+00:00

I am using a cv::VideoCapture in native code and I am having issues with

  • 0

I am using a cv::VideoCapture in native code and I am having issues with it :
In android java code, Videocapture gives a Yuv420 frame, in native code it’s a BGR one. Since I need a gray image, having a Yuv image would be better (I read there was no cost in converting Yuv to GRAY).

Here are my questions :

A im using a Asus TF201, acquiring a frame takes about 26ms which is a lot… as the standard android camera API gives Yuv does the native version of VideoCapture performs a conversion ? (which would explain the time cost)

Is it possible to change the format with CV_CAP_PROP_FORMAT ? Whenever I try mycapture.get(CV_CAP_PROP_FORMAT) my app crashes…

EDIT : Andrey Kamaev answered this one. I have to use grab/retrieve methods adding a argument in the second one :

capture.retrieve(frame, CV_CAP_ANDROID_GRAY_FRAME);

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T18:19:58+00:00Added an answer on June 5, 2026 at 6:19 pm

    Look at the OpenCV samples for Android. Most of them are getting gray image from a VideoCapture object:

    capture.retrieve(mGray, Highgui.CV_CAP_ANDROID_GREY_FRAME);
    

    Internally this gray image is “converted” from yuv420 frame in the most efficient way – even without extra copying.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to grab consecutive frames from android using opencv VideoCapture class. Actually
I'm having some errors with my custom recording application using android. I saw most
Using VideoCapture vcc(someDir/someFile.avi); as the first line in my code (OpenCV 2.x, Win7, VS2010),
Using LINQ on collections, what is the difference between the following lines of code?
Im using Xcode and c++ I have copied the HoughCircles code from the OpenCV
Using android 2.3.3, I have a background Service which has a socket connection. There's
My Goal is to capture Video using Android Camera and Record Voice from Mic.
How can you capture Video using Java ? You have to use JMF ?
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
Using gcc and ld on x86_64 linux I need to link against a newer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.