Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

extract only data with open cv?

$
0
0
hey friends I tried to convert greyscale image to binary image , but now I want see only data without header ? how I can extract header only and data only ? after I want save header in file and data to in other file? nota:visual studio 2010 , opencv 2.4.9 , c programming int _tmain(int argc, _TCHAR* argv[]) { //load image IplImage* im_gray = cvLoadImage("image1.pgm",CV_LOAD_IMAGE_GRAYSCALE); //convert to grey //IplImage *im_rgb = cvLoadImage("image.jpg"); //cvCvtColor(im_rgb,im_gray,CV_RGB2GRAY); //convert to binary IplImage* im_bw = cvCreateImage(cvGetSize(im_gray),IPL_DEPTH_8U,1); cvThreshold(im_gray, im_bw, 128, 255, CV_THRESH_BINARY | CV_THRESH_OTSU); //save to disk cvSaveImage("image_final2.pgm",im_bw);

Viewing all articles
Browse latest Browse all 19555

Trending Articles