0

When using a equivalent of Mat with CUDA we use cv::cuda::GpuMat

Is there a equivalent of Mat1b to use with CUDA?

Is there a equivalent of Mat_ as in GpuMat_?

KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
  • https://stackoverflow.com/questions/30831081/conversion-between-mat-and-mat1b-mat3b – Robert Crovella May 19 '21 at 01:01
  • @RobertCrovella that question does not deal with CUDA – KansaiRobot May 19 '21 at 01:03
  • 1
    @KansaiRobot: But did you read the answer? Mat1b is literally a preprocessor define of a standard Mat with a byte sized type. There would be nothing stopping you from writing one line of code to do the same..... – talonmies May 19 '21 at 01:10
  • @talonmies so that means that *I have to write it* rather than it is there already, right? – KansaiRobot May 19 '21 at 12:04
  • No you don't even have to write it. It just aliases an existing type. Mat1b is just a Mat. – talonmies May 19 '21 at 12:32
  • I mean the CUDA version one – KansaiRobot May 19 '21 at 12:43
  • 1
    Do you understand how types work in C++? Mat1b is just an alias to Mat. It doesn't exist as some special type. It is just `Mat`. The GPU equivalent is just `GpuMat`. There is nothing magical happening here – talonmies May 19 '21 at 14:01
  • I read the linked answer and it says "two pre-defined cases of Mat types, which are defined in core.hpp as follows:". So clearly those typedef are written in core.hpp. My comments above indicate that I would like to know if something similar exist for CUDA. ergo, is there a XX.hpp where a typedef is written that create the alias we are talking about? – KansaiRobot May 20 '21 at 07:02
  • also there is a template class `Mat_`. Is there an equivalent class `cuda::GpuMat_`? – KansaiRobot May 20 '21 at 07:05

0 Answers0