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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:53:53+00:00 2026-06-15T12:53:53+00:00

I am writing an application that does some real-time processing on image data it

  • 0

I am writing an application that does some real-time processing on image data it gets from AVCaptureVideoDataOutput within an AVCaptureSession.

I am currently able to start the session, add input & output and then retrieve image data, convert it to UIImage and display it on the screen live.

The main problem I’m having is that the image’s orientation is awkward. It’s rotated and mirrored and it also looks skewed. I’ve done some research into it, I’ve found some related questions, and I’ve tried the code that has been suggested but it doesn’t fix the rotation problem.

I think the questions linked assume the UIImages came from somewhere else (perhaps a higher-level api that adds more information, such as orientation, to the image automatically. Or perhaps it’s because I’m getting it from a video output feed?

I am not really looking for the code that fixes it (although an annotated example would be really helpful), but rather a good explanation of what the lifecycle of an image obtained in this way works; What’s the recommended way to deal with it so that it can be displayed on the screen in a way that makes sense to the phone’s orientation? What’s the orientation of the CGImageRef that comes back? etc.

I have a previous question that has the code I’m using to set up the AVCaptureSession.

  • 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-15T12:53:53+00:00Added an answer on June 15, 2026 at 12:53 pm

    The video connection is usually in landscape (e.g. AVCaptureVideoOrientationLandscapeRight)
    There is some good info on this apple Q&A

    My understanding is that you cannot set the video Orientation on AVCaptureVideoDataOutput.
    Hence all the various tricks in your links to rotate the current frame image in the AVCaptureSession delegate method captureOutput:didOutputSampleBuffer:fromConnection:

    I assume from your previous post that you looked at the SquareCam sample project. The RosyWriter project provides also some interesting handling of orientation, by comparing the videoOrientation property of the connection to a “reference” portrait orientation expected by the application.

    Hope it helps.

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

Sidebar

Related Questions

I am writing a Catalyst web application that presents some data that does not
I'm writing a console application that does a good amount of data retrieval from
I am writing a small application that does a lot of feed processing. I
I'm writing a java application that reads input, populates data structures, and then does
I am writing an Android application that does much of a processing in the
I'm writing an application that uses a 3rd party library to process some data.
I am writing a JAX-RS (Jersey+Maven) application that does some tricky things (eg call
I writing an application that pushes data over an external service to some server.
I have just been involved in writing an application that does not use Doctype's
I am writing an application using Cairo in C that does the following: Load

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.