#include
#include
using namespace cv;
using namespace std;
int main(int argc,char** argv)
{
Mat img1, img2,img3,img1_1;
img1 = imread("D://images//4.jpg");
if (img1.empty())
{
cout <
return 0;
}
namedWindow("win1",CV_WINDOW_AUTOSIZE);
imshow("win1",img1);
img1.copyTo(img1_1);
//namedWindow("win1_1", CV_WINDOW_AUTOSIZE);
//imshow("win1_1", img1_1);
cvtColor(img1,img2,CV_BGR2GRAY);
namedWindow("win2", CV_WINDOW_AUTOSIZE);
imshow("win2", img2);
int height = img2.rows;
int width = img2.cols;
for (int row=0;row
{
for (int col=0;col
{
int px_value = img2.at(row,col);
//cout << px_value<