Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

656
Visualizações
Emgu CV and IInputArrayOfArrays on Merge() function

I am struggling to understand what is an IInputArrayOfArrays.

It's a bit confusing when you check the docs of OpenCV or EmguCV and most of the functions got IInputArray or IOutputArray on the function parameters, but with some search you get to know that it means basically a Mat.

But in this case, I thought that a IInputArrayOfArrays must be an array of Mat, but this is not working on C#:

Mat[] channels = hsv.Split();
channels[1] = customMask;
CvInvoke.Merge(channels, hsv);

Because Can't convert from Emgu.CV.Mat[] to Emgu.CV.IInputArrayOfArrays.

Since the Split() function returns Mat[], it would be logical that the Merge() function (that is exactly the opposite of the Split()) needs a Mat[] also...

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Pay attention to not confuse CvInvoke.Split() and Mat.Split().

Using Mat.Split() will return a Mat[] but CvInvoke.Merge() does not accept that.

Instead, if you use CvInvoke.Split() it will return you a VectorOfVectorOfByte, the same type that the CvInvoke.Merge() method needs, making it exactly the opposite of the CvInvoke.Split() indeed.

Here's an example with your case:

VectorOfVectorOfByte splitted = new VectorOfVectorOfByte();
CvInvoke.Split(channels, splitted);
// ... //
CvInvoke.Merge(splitted, channels);
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda