0

I've just implemented corner detection using OpenCV and i got the corner value as zero.i use 3488*2616 resolution camera images.it is there any proper way to find the corner detection for high resolution images.i d'not know where i did my mistake.Here with i've attached my code and images also.please help me.i'm very new to opencv.sorry for my English.

int board_w = 6;
int board_h = 6;
const int MAX_CORNERS = 500;

int main()
{

    int board_n = (board_w-1) * (board_h-1);
    CvSize board_sz = cvSize( board_w-1, board_h-1 );


    CvPoint2D32f* corners = new CvPoint2D32f[board_n];
    int cornerCount = 0;

    IplImage *image = cvLoadImage("myimage.jpg");
    IplImage *gray_image = cvCreateImage(cvGetSize(image),8,1);
    cvCvtColor(image, gray_image, CV_BGR2GRAY );
const int N = cvFindChessboardCorners(gray_image,board_sz,&corners[0],&cornerCount,10);


    cvFindCornerSubPix(gray_image,&corners[0],cornerCount,cvSize(3,3),cvSize(-1,-1),cvTermCriteria(CV_TERMCRIT_EPS,0,.01)); 

    printf("\ the count was:%d \n",cornerCount);
    for (int i = 0; i < cornerCount; i++)
    {
cvCircle (image, cvPointFrom32f (corners[i]), 3, CV_RGB (0, 0, 255), 2);

    }

        cvNamedWindow("firstframe");            
        cvShowImage("firstframe",image);
        cvWaitKey(0);
    cvReleaseImage(&image);
    cvReleaseImage(&gray_image);



}

The code will work for normal chessboard images.but while using real time camera images with that resolution it ll not works.please help me.thanks in advance. enter image description here

karlphillip
  • 92,053
  • 36
  • 243
  • 426
aranga
  • 377
  • 1
  • 6
  • 20

1 Answers1

0

If you suspect that detection is really failing simply because you are using high resolution images, you can always cvResize() your IplImage to a smaller size and verify your observation.

karlphillip
  • 92,053
  • 36
  • 243
  • 426
  • Thanks for your reply...When i Resize the image i got the corners but i need to use that corner point for calibration...is it affect my calibration results.?? – aranga Jun 02 '12 at 06:52