Ask Your Question
1

No ‘operator-=’ for gpuMat

asked 2012-08-07 05:38:45 -0600

Gianluigi gravatar image

I try to build the sample code in tutorial Similarity check (PNSR and SSIM) on the GPU , and there are many error like gpu-basics-similarity.cpp 328 error: no match for ‘operator-=’ in ‘sigma1_2 -= mu1_2’

I try to trace the gpumat.hpp and gpu.hpp, it seems like there is really no implement of operator like +, -, *, +=, -=, ...

Is this a bug or something I misunderstand?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
3

answered 2012-08-07 07:13:43 -0600

Vladislav Vinogradov gravatar image

It seems like it's bug in documentation and sample code. There are no overloaded operators +,-,+=,etc for GpuMat.

Use gpu::subtract(b.sigma1_2, b.mu1_2, b.sigma1_2, stream);

edit flag offensive delete link more

Comments

Should I issue this to code.opencv.org?

Gianluigi gravatar imageGianluigi ( 2012-08-08 00:43:04 -0600 )edit
1

Yes. Documentation error is still an error and need to be fixed.

Michael Burdinov gravatar imageMichael Burdinov ( 2012-08-08 02:30:51 -0600 )edit

Question Tools

Stats

Asked: 2012-08-07 05:38:45 -0600

Seen: 757 times

Last updated: Aug 07 '12