Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What could be wrong?

the whole "write per-pixel loops" approach !

you're still confusing rows and cols.

for (int y = 0; y < dst.cols; y++) // no. y goes from 0 to dst.**rows** !

please use bitwise_not instead, or it's short form (an operator):

dst = ~dst;

or, like mentioned before:

dst = 255 - dst;

also, yes, the:

VideoCapture cap(0);
if (!cap.isOpened())
   return 1;

part must go before starting the

while(1) {

loop.