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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:03:21+00:00 2026-05-26T13:03:21+00:00

When trying to load an Image and copy a part of it or smooth,

  • 0

When trying to load an Image and copy a part of it or smooth, everything ok, but when I’m capturing video and try to copy a part of the frame, it becomes reverse and rotated on 180 degrees, does anybody knows why?

IplImage *scaled=cvCreateImage(sz,IPL_DEPTH_8U,3); 
capture = cvCaptureFromFile( "C:\\New York.avi" ); 
IplImage *frame = cvQueryFrame( capture ); 
cvResize(frame,scaled,CV_INTER_LINEAR); 
cvShowImage("123",scaled);
cvReleaseImage(&scaled);
  • 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-05-26T13:03:21+00:00Added an answer on May 26, 2026 at 1:03 pm

    You need to match the depth and number of channels of the destination image to make the resize operation work. Right now, you are assuming these values.

    capture = cvCaptureFromFile("C:\\New York.avi"); 
    IplImage* frame = cvQueryFrame(capture); 
    IplImage* scaled = cvCreateImage(sz, frame->depth, frame->nChannels); 
    
    cvResize(frame, scaled, CV_INTER_LINEAR); 
    cvShowImage("123", scaled);
    
    cvWaitKey(0); // wait for a key press, and then
    
    cvReleaseImage(&scaled);
    

    I hope you are using a recent version of OpenCV.

    EDIT:

    On a comment below you stated that you are using OpenCV b5a. I just found a message from 2006 that mentions this version, which means you are using a jurassic release of OpenCV and that’s probably the root of the problem.

    There’s a page that shows how to use OpenCV with C++ Builder, but if you are having problems with that, I suggest you move to another compiler.

    What you are observing is most likely a bug of this ancient release of OpenCV.

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

Sidebar

Related Questions

I am trying to load an image but it is showing the error message
I am trying to load an image in memory but might have memory issues
I'm trying to load an image through PHP, but I don't know how. The
I am trying to load the image in the following way. But when I
When I'm trying to load an image via Qt console application in Xcode everything
i'm trying to load image from local disk, and it's working. But my problem
I am trying to load and display an image using WPF, but it does
I'm trying to load image from a plist to a custom cell. It all
Im trying to load a image at runtime in WPF using the following code
I am trying to load an image and add some text to it. my

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.