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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:52:43+00:00 2026-06-05T13:52:43+00:00

I know only C language, so I am getting confusion/not understanding the syntax of

  • 0

I know only C language, so I am getting confusion/not understanding the syntax of the openCV data types particularly in cv::Mat, CvMat*, Mat.

My question is How can I convert cv::Mat to const CvMat* or CvMat*, and can any one provide documentation link for difference between CvMat *mat and cv::Mat and Mat in opencv2.4.

and How can I convert my int data to float data in CvMat ?
Thank you

  • 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-05T13:52:46+00:00Added an answer on June 5, 2026 at 1:52 pm

    cv::Mat has a operator CvMat() so simple assignment works:

    cv::Mat mat = ....;
    CvMat cvMat = mat;
    

    This uses the same underlying data so you have to be careful that the cv::Mat doesn’t go out of scope before the CvMat.

    If you need to use the CvMat in an API that takes a CvMat*, then pass the address of the object:

    functionTakingCmMatptr(&cvMat);
    

    As for the difference between cv::Mat and Mat, they are the same. In OpenCV examples, it is often assumed (and I don’t think this is a good idea) that using namespace cv is used.

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

Sidebar

Related Questions

I'm learning Java and as I know only abstract classes and interfaces cannot be
How can I create client proxy if I know only the type of service
I have to show slideshow of images. But at one moment I know only
I only know of one way: Right click and click 'delete me' How else
I only know that the difference between hashmap and map is that hashmap is
I only know Wordpress and have started to seek another alternative framework, Zend. I
I only know basic concepts for multi-threading, and I currently encounter a situation that
Anyone know why only undirectional serialization is supported in the Linq designer? Consider the
so far i only know to use Ctrl-Shift-A to do SVN in TextMate. is
I have an ICollection that I know will only ever have one member. Currently,

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.