Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

roi (Region of Interest)

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();

roi (Region of Interest)

I want to use histogram only the center part of my image.I used roi.It works use histogram for illumination images but i want I wanted to add this part use it only on the center of the image because of time limitations. My roi function's execute time is 0.2ms. Using the equalizeHist function's execute time is 1.0ms. In addition to the original image.Here this, when I use equalizeHist, it sometimes causes noises.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();

roi (Region of Interest)

I want to use histogram only the center part of my image.I use histogram for illumination images but I wanted to use it only on the center of the image because of time limitations. My roi function's execute time is 0.2ms. Using the equalizeHist function's execute time is 1.0ms. In addition to this, when I use equalizeHist, it sometimes causes noises.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();

roi (Region of Interest)

I want to use histogram only the center part of my image.I use histogram for illumination images but I wanted to use it only on the center of the image because of time limitations. In addition to this, when I use equalizeHist, it sometimes causes noises.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();

roi (Region of Interest)

I want to use histogram only the center part of my image.I use histogram for illumination images but I wanted to use it only on the center of the image because of time limitations. In addition to this, when I use equalizeHist, it sometimes causes noises.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();