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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:45:15+00:00 2026-05-27T05:45:15+00:00

The CvMat type 16 corresponds to CV_AA. Is there an easy conversion between this

  • 0

The CvMat type 16 corresponds to “CV_AA”. Is there an easy conversion between this and the type CV_32F?

Something in the same vein as cvCvtColor(cimg,gimg,CV_BGR2GRAY);?

  • 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-27T05:45:15+00:00Added an answer on May 27, 2026 at 5:45 am

    CV_AA is used for telling drawing functions (i.e., line, circle, fonts, etc) to perform anti-aliased drawing; I don’t believe it is a proper Mat data-type. As you can see in core_c.h, it is defined in the drawing functions section.

    Could you show the code where you are receiving this data-type from?

    EDIT : I think I see what’s going on 🙂

    Given that CV_8U is this:

    #define CV_8U   0
    

    And CV_MAKETYPE is:

    #define CV_MAKETYPE(depth,cn) (CV_MAT_DEPTH(depth) + (((cn)-1) << CV_CN_SHIFT))
    

    where cn is the number of channels, and CV_CN_SHIFT is 3. I’m betting the type 16 you are seeing is actually

    (0 + ((3 - 1) << 3)) -> 16 or AKA CV_8UC3.

    So, you have an 8bpp RGB image not a CV_AA image 🙂

    You need to convert each channel from CV_8U to CV_32F.

    EDIT : Take a look at using cvSplit and cvMerge (I haven’t used the C interface in a while, but it should be something like the following):

    IplImage* src = cvCreateImage( size, IPL_DEPTH_8U, 3 ); // CV_8UC3
    IplImage* r8u = cvClone(src); 
    IplImage* g8u = cvClone(src);
    IplImage* b8u = cvClone(src);
    
    IplImage* dst = cvCreateImage( size, IPL_DEPTH_32F, 3 ); // CV_32F
    IplImage* r32f = cvClone(dst); 
    IplImage* g32f = cvClone(dst);
    IplImage* b32f = cvClone(dst);
    
    // split the channels apart...
    cvSplit(src, b8u, g8u, r8u, NULL); // assuming in OpenCV BGR order here...may be RGB...
    
    // convert the data...
    cvConvertScale(b8u, b32f, 1, 0);
    cvConvertScale(g8u, g32f, 1, 0);
    cvConvertScale(r8u, r32f, 1, 0);
    
    // merge them back together again if you need to...
    cvMerge(r32f, g32f, b32f, NULL, dst);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to have a matrix of user-defined type in OpenCV 2.x?
I want to convert an iplimage to a cv::mat (not CvMat). With this code
When using the CvMat type, the type of data is crucial to keeping your
Is there a way where I can converts a CvMat * to a CvMat?
Using OpenCV, saving a CvMat structure into a YAML file on the disk is
The old, C style cvMat matrices could be passed to the cvSave() function for
I already some post about releasing all the IplImage and all the CvMat structure
When I use this code to rotate the image, the destination image size remains
I'm experiencing a mismatch between the OpenCV GaussianBlur function and the EmguCv CvInvoke.cvSmooth/Image.SmoothGaussian functions.
I am trying to create a CvMat data structure using cvMat() in OpenCV. The

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.