Ask Your Question

Revision history [back]

Different output in adding two images.

Hi, I am using OpenCV 4.0.0 with C++. I have few doubts. I need explanation for output of addition : When I am adding two images A and B of same size : 1) (A+B)/2 and 2) (A/2)+(B/2) the output is same while when I am making one image 3) C = (A+B) and in next line C=C/2 the output is different. I was expecting 1) (A+B)/2 and 3) C = (A+B) and in next line C=C/2 to have same output but this was not same and rather 1) and 2) were giving same output. Note : All the images are of type CV_8UC1. Please give proper explanation.