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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:12:38+00:00 2026-06-05T07:12:38+00:00

I am using OpenCV 2.1 with vs2010(coding in C). After extracting the blue plane

  • 0

I am using OpenCV 2.1 with vs2010(coding in C). After extracting the blue plane from a rgb image, I applied dct to it to get the transformed matrix.

cvDCT(source,destination,CV_DXT_FORWARD);

It is successfully building, but somehow it is not executing

The error is like “Unhandled exception at 0x75c89617 in freqDomain.exe: Microsoft C++ exception: cv::Exception at memory location 0x001ce35c..”

I think the error is in setting the type of cvarray of output image. is it okay to set it to IPL_DEPTH_8U or should it be float?

This is my code snippet:

int main()
{
    IplImage *input,*output,*b,*g,*r;
    input=cvLoadImage("dolphin.jpg");
    int width,height;
    width=input->width;
    height=input->height;
    b=cvCreateImage(cvSize(width,height),IPL_DEPTH_8U,1);
    g=cvCreateImage(cvSize(width,height),IPL_DEPTH_8U,1);
    r=cvCreateImage(cvSize(width,height),IPL_DEPTH_8U,1);
    cvSplit(input,b,g,r,NULL);
    cvNamedWindow("blue",CV_WINDOW_AUTOSIZE);
    IplImage *b_dct,*g_dct,*r_dct;
    b_dct=cvCreateImage(cvSize(width,height),8,1);
    g_dct=cvCreateImage(cvSize(width,height),8,1);
    r_dct=cvCreateImage(cvSize(width,height),8,1);
    cvDCT(b,b_dct,0);  // doubt??
    cvShowImage("blue",b_dct);

    ...
  • 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-05T07:12:39+00:00Added an answer on June 5, 2026 at 7:12 am

    yeah found the solution 🙂
    the problem was with the datatype of source image. it should be float or double..
    I used cvConvert function to convert from unsigned int to 32 bit float values.

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

Sidebar

Related Questions

I am implementing an image analysis algorithm using openCV and c++, but I found
I'm trying to write some code using OpenCV. My sensor is from Point Grey
I'm using OpenCV 2.3.2 library downloaded from OpenCV trunk. I want to use setOpenGlDrawCallback
I'm using OpenCV to fit a line from a set of points using cvFitLine()
I'm trying to display an image using OpenCV. I have the following very basic
I am using OpenCV 2.3.1 in Android. I need to crop the image into
I am using OpenCV Haar Algorithm to track the Head and overlay an image
I am trying to track objects inside an image using histogram data from the
Im using opencv 2.0 with cvblob.h in VS2010 and I made a program that
I am using openCV python bindings. I am trying to show the output image

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.