i have found the solution myself..Hope this will help....
int xC,yC;
int *Xvalues = new int[15];
int *Yvalues = new int[15];
int count = 0;
bool drawing_circle = false;
<pr>
void draw_circle(IplImage* img, int x,int y)
{
cvCircle(img,cvPoint(x,y),1,CV_RGB(0,255,0),-1);
Xvalues[count] = x;
Yvalues[count] = y;
count++;
}
}
void my_mouse_callback( int event, int x, int y, int flags, void* param ){
IplImage* image = (IplImage*) param;
switch( event ){
case CV_EVENT_LBUTTONDOWN:
drawing_circle = true;
xC = x;
yC = y;
break;
}
}
int _tmain(int argc, _TCHAR* argv[])
{
cvNamedWindow("Shapes",CV_WINDOW_AUTOSIZE);
shape=cvLoadImage("bb.jpg");
cvSetMouseCallback( name, my_mouse_callback, (void*) image);
cvShowImage("Shapes",shape);
while( 1 ){
if( drawing_box )
{
draw_circle( image, xC,yC );
}
cvWaitKey(0);
cvReleaseImage(&shape);
cvDestroyAllWindows();
return 0;
}