//**************************label**********************
#include <stdio.h>
#include <cv.h>
#include <highgui.h>
#include "label.h"
int main()
{
//imread an image
IplImage* g_image0 = cvLoadImage("D:\\My Documents\\Visual Studio 2005\\4.jpg",1);
int Num = 0;//Num 为连通区的数目
IplImage* g_image2 = hjyLabel(g_image0,Num);
cvNamedWindow("Contours",1);
cvShowImage("Contours",g_image2);
printf("\n The connected components number is: %d\n",Num);
cvWaitKey(0);
}
- 1
- 2
- 3
- 4
前往页