Last active
December 31, 2015 14:55
-
-
Save bowbowbow/f5546e490186c0de00e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <math.h> | |
#include <opencv2/opencv.hpp> | |
using namespace cv; | |
using namespace std; | |
int main(){ | |
Mat sourceImg =imread("/Users/clsrn1581/Desktop/sample.png", CV_LOAD_IMAGE_GRAYSCALE); | |
for(int y = 0 ;y < sourceImg.rows; y++){ | |
for(int x = 0; x < sourceImg.cols; x++){ | |
printf("%3d ", (int)sourceImg.at<unsigned char>(y,x)); | |
} | |
printf("\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment