Originally Posted by
laserlight
What exactly are the difficulties that you faced when attempting to get it running?
first, when adding a user to the database. it will print segmentation done...encoding done but it will not add the image to the database. i.e it will not print "4 images added to the database.
second,when comparing a user to the database,it will print segmentation done...matching done. but it will not print that the user is in database or user is not in database which is its main use.
lastly, i found that int support_grbg = 0 has been initialized to 0 but later has been assigned value of 1.
Code:
int support_grbg10 = 0;
struct v4l2_fmtdesc fmtdesc = {0};
memset(&fmtdesc, 0, sizeof(fmtdesc));
fmtdesc.index = 0;
fmtdesc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
char fourcc[5] = {0};
char c, e;
printf(" FMT : CE Desc\n--------------------\n");
while (0 == xioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc))
{
strncpy(fourcc, (char *)&fmtdesc.pixelformat, 4);
if (fmtdesc.pixelformat == V4L2_PIX_FMT_SGRBG10)
support_grbg10 = 1;
c = fmtdesc.flags & 1? 'C' : ' ';
e = fmtdesc.flags & 2? 'E' : ' ';
printf(" %s: %c%c %s\n", fourcc, c, e, fmtdesc.description);
fmtdesc.index++;
}