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

  • Home
  • SEARCH
  • 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 6791781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:53:16+00:00 2026-05-26T17:53:16+00:00

I have a cv::Mat image, and I am thinking about having a second cv::Mat

  • 0

I have a cv::Mat image, and I am thinking about having a second cv::Mat of the same size, but where each entry stores a complex data structure corresponding to that pixel instead. Can this be done with cv::Mat or is a vector of vectors my only open there?

  • 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-26T17:53:16+00:00Added an answer on May 26, 2026 at 5:53 pm

    Looking at cv::Mat‘s documentation, especially the constructors and the type, channels and depth methods, it seems to only be able to contain simple OpenCV data types (8/16/32-bit ints, 32/64-bit floats, or 1/2/3/4-tuples of these, but not a mixture, of course).

    But even then, I wouldn’t suggest a vector of vectors for a two-dimensional array/matrix/image (where all rows have the same number of columns), but rather a simple 1D vector with some simple index magic doing the mapping from 2D to 1D. This has much better memory locality and allocation behaviour.

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

Sidebar

Related Questions

I have an image (cv::Mat) with size of 92x112 I want to surround the
I have some allocated cv::Mat face; with actual data in it and I want
I have searched internet and stackoverflow thoroughly, but I haven't found answer to my
I have a binary image in Matlab, and I need the binary array(0 and
I have this matrix A, representing similarities of pixel intensities of an image. For
In OpenCV to create an image Mat I'd usually do something along the lines
I have this image above. I want to parts of the image to show
I'm working with arrays of image filepaths. A typical array might have 5 image
I have narrowed down an ugly bug, but since it seems like something internal
in my application I have a Mat file which i'd like to show in

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.