I want to use histogram only the center part of my image.I used roi.It works but i want to add this part of image to the original image.Here is my code;
Mat img1=imread("imageLight100.bmp");
Mat img2=img1.clone();
Rect roi = Rect(100,100,200,200);
Mat roiImg;
roiImg = img1(roi);
cvtColor(roiImg, roiImg, CV_RGB2GRAY);
equalizeHist(roiImg,roiImg);
imshow("roi",roiImg);
cvtColor(img2, img2, CV_RGB2GRAY);
img2.copyTo(roiImg);
imshow("roiImage",img2);
waitKey();