Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imread() CAN fail, so please check like image.empty() before trying to process it.

also -- please try to avoid per-pixel loops, they're slow and error-prone.

your whole code coud be simply written as:

modified *= 0.5;