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 8878761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:47:27+00:00 2026-06-14T19:47:27+00:00

I am doing some real-time video processing with openCV. So much in fact that

  • 0

I am doing some real-time video processing with openCV. So much in fact that the screen is a bit choppy while doing the processing. What I’d like to do is still process the images through the CvVideoCameraDelegate method as usual, but show the user just the capture session video output, which should be less choppy.

I do all the video processing in the delegate callback method

- (void)processImage:(Mat&)image;

So when I load the view, I try to set it up so that the capture session is what is being outputted. It looks like you can access the capture session of the CVVideoCamera like this:

AVCaptureSession *session = videoCamera.captureSession;

So then, I have a view in my layout file that I’d like to connect it to called baseView. I try to do so like this:

AVCaptureVideoPreviewLayer *previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:session];
CGRect screenRect = baseView.bounds;
previewLayer.frame = screenRect; // Assume you want the preview layer to fill the view.
[baseView.layer addSublayer:previewLayer];

However this does not work. Just a plain white screen. I can tell though that video processing is still being done in the background, but no video is being outputted anyway.

Edit: notice that I didn’t just set up an additional capture session to do this because I am trying to limit CPU tasks

  • 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-14T19:47:28+00:00Added an answer on June 14, 2026 at 7:47 pm

    Ok I figured it out:

    I tried typing in

    BOOL loaded = videoCamera.captureSessionLoaded;
    

    And it turns out the camera wasn’t fully loaded. In fact, it wont fully load until you start the capture (obviously I guess?)

    So as soon as I put my code below

    [self.videoCamera start];
    

    Everything seems to work as expected

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

Sidebar

Related Questions

I'm doing some prototyping with OpenCV for a hobby project involving processing of real
While doing some refactoring I've found that I'm quite often using a pair or
While testing some real-time simulation code which uses a Swingworker I noticed my GUI
Doing some profiling (mem & speed) I've been stomped by the fact that win7
I have a transactional grails service which is doing some (long running) processing. While
I may be doing an iPhone-based application doing near-real-time sound-processing (filtering, etc). I was
I've just started doing some real-world performance testing on my Fluent NHibernate / SQLite
While doing some JavaScript performance tests I came up with the following piece of
While doing some random experimentation with a factorial program in C, Python and Scheme.
I am doing a project called user initiated real time object tracking system .

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.