Quote:
Originally Posted by Ericxx
Wondering if "Address 0xxxxx out of bounds" is causing the problem. But there are several times the error still happens without this hint.
|
That can be difficult if you aren't an experienced programmer, since apparently this isn't your code.
In the failure you showed, bgra is a pointer that points to an invalid address. You didn't show enough info for me to see why bgra points to an invalid address.
Most likely, the variable i at the point of failure is non zero, from which you could deduce that size.width is too large and the loop has incremented bgra from a valid pointer to an invalid one.
If i were zero then bgra must have been invalid before that section of code started.
It is reasonably to assume the code from opencv is correct and your code contains the error. So there must be something wrong with the InputArray you passed to imwrite().