Ask Your Question

Sanman's profile - activity

2017-06-19 06:53:43 -0600 asked a question How can I create Image dataset with OpenCV ?

I am working on a Devnagari character recognition project. I want to create a database which will have only the numeral values. I want to know how can I move in forward direction with this problem ?

I want to know,

  1. How can I get the input from the contributors ? (On paper, OR any other media ?)
  2. If it is on paper, how should I scan the individual paper (what PPI, density, resolution OR any specific setting ?)
  3. How can I separate OR obtain each character from single image (which will have 0-9 written in Devnagari) ?
  4. Which format I should store the image in ?

and finally,

  1. Is this how you are supposed to create a dataset ?

Any help/lead is appreciated as this is nearly half of the work I have to do for project.

2016-09-19 09:44:49 -0600 commented answer Manipulate Image

The option you have suggested won't require OpenCV ?

2016-09-15 00:36:07 -0600 commented answer Manipulate Image

So doing the image processing thing will be a computational overhead as compared to the method you have suggested ?

2016-09-14 06:28:42 -0600 commented answer Manipulate Image

I am open to suggestion if you think other method would work just fine for this. The Reference Paper which I have mentioned demands this, this is a technique used for character recognition called as "Ring Features" .

2016-09-13 13:16:54 -0600 commented answer Manipulate Image

Again thank you so much for the reply and help @Tetragramm, really appreciate it. I will definitely write some code first now and will come back again in case if I am stuck somewhere. One small thing I wanted you to know is that I will be measuring the no. of white pixels in the circle with width denoted by specific colour, so I will not be increasing the size (or radius) of the circle from centre of the image by 5 pixels for each iteration. I am doing this for character recognition using "Ring Features", have a look at this Reference Paper

2016-09-13 11:52:54 -0600 commented answer Manipulate Image

Changed the main question a bit (changes are formatted in bold and italic in the main question) as there was no option to add attachment while replying to your comment. May be that part will help you in understanding my problem better.

2016-09-13 01:16:57 -0600 commented answer Manipulate Image

Thank you so much for the answer @Tetragramm . I also wanted to know how I will calculate the centre of the image and then start cutting the image into circle of radius 5 ? Like how will I refer to the centre of location with co-ordinates (0,0) ?

2016-09-10 05:24:29 -0600 asked a question Manipulate Image

I have a B&W image of size 200 X 200. I want to divide this image into circles of pixel width say 5 pixels and want to count the number of white pixels in the cropped circle. So the radius should be of 5 pixels. How can I get the centre of image ? After the first crop of radius 5 pixels, i want to again crop starting from 6th pixel with radius length 5 pixels and do the same till the whole image is divided into circles.

Can anyone help me in understanding the OpenCV library function which are there to perform this task ? I want to know which functions are there and how parameters are passed to achieve this.

The input image supposed to look like this C:\fakepath\Untitled drawing.png I want to divide the image in such circles denoted by different colours and then measure the no. of white pixels in each region.

Newb to OpenCV. Any help is appreciated. Thanks in advance

2016-03-17 04:02:51 -0600 commented answer Is it possible to detect face using CUDA in OpenCV ?

Thank you for your response. The problem I am facing is what if I want to parallelize the code on GPU only (without OpenCL or the parallelized CPU version) ? and why there are two different versions of cascade file (haarcascade & haarcascades_cuda) in the data folder of OpenCV installation ? Is there any difference between them ? Will I get speed up in detection process if I use CUDA and the CUDA haarcascade xml file ?

2016-03-17 01:58:16 -0600 asked a question Is it possible to detect face using CUDA in OpenCV ?

I am trying to compare the serial and parallel implementation of face detection using Haar features. I have already implemented the serial process. I want to know whether OpenCV provides Haar Cascade file for parallel implementation of face detection using Haar features ? and if there is such thing is possible then what is the theory behind it ? Please help.

2016-03-15 23:47:24 -0600 marked best answer Error while running code in visual studio 2010

I am a beginner in opencv. While I try to run my simple code to open an image an error occurs saying MSVCP110D.dll is missing. The project builds without an error, but throws an error while running the code. Here is a screenshot of the error C:\fakepath\error.PNG

2016-03-02 00:06:45 -0600 commented answer How the 3 basic Haar features are formed from the Haar wavelet ?

People who are wondering about the same question and are not satisfied with this answer, then refer to this paper by P. Sinha This will clear out some things P. Sinha

2016-02-22 00:00:09 -0600 received badge  Enthusiast
2016-02-21 23:04:22 -0600 commented question Face Detection using GPU

Thank you for your help. I also want to know how this works internally ? By that I mean the actual working of algorithm or the process. I want to know where this GPU implementation differs in the actual face detection process. How those GPU haar cascade files are formed, what part of the actual process is implemented in parallel?

Can you help me with that ?

2016-02-21 11:10:48 -0600 asked a question Face Detection using GPU

I want to know whether openCV version 3.0 provides parallel GPU implementation of face detection i.e with CUDA ? If it provides that then how the training of haar cascade is done for it ? Please direct me to reading , online materials which can help me better understand the concept behind this.

2016-02-19 00:23:27 -0600 commented answer How the 3 basic Haar features are formed from the Haar wavelet ?

That's where I am confused, cause there are typically 3 types of features. 2,3 and 4 rectangle feature. This features vary in size (length and width) as they try to detect the face. So why only this 3 type of features, they could have also derived a 5 rectangle feature or a 6 rectangle feature. I know that would have increased the complexity in some way, but why only this specific 3 type of features and how they have arrived to this conclusion of deriving only this 3 type features ?

2016-02-17 01:35:33 -0600 commented answer How the 3 basic Haar features are formed from the Haar wavelet ?

I have read the Viola Jones paper, but they have not mentioned how this 4 basic haar features are formed ? I want to know how they have selected only this features, was that just their assumption or is there any logic behind forming only those typical 4 features ? I know how the whole process of face detection works. Right from integral image representation, Adaboost to Cascade Classifier, but why only this 4 features ?

2016-02-09 05:08:03 -0600 received badge  Student (source)
2016-02-08 12:35:45 -0600 received badge  Supporter (source)
2016-02-08 12:32:32 -0600 marked best answer Save detected eyes in form of images

I have been working on eye detection and I want to detect and then extract the eyes from video feed at specific interval. I want to store the detected eyes in form of images. I have done the detection of eyes using haar cascade. Now I just want to store the detected eyes in form of images. Can anyone tell me what I can do to for the problem ? The detection code is as follows


int main()
{
CascadeClassifier face, eye;
if(!face.load("C:\\HAAR\\haarcascade_frontalcatface.xml")){

    printf("Error Loading Face Cascade");
        return -1;
}

    if(!eye.load("C:\\HAAR\\haarcascade_eye_tree_eyeglasses.xml")){

    printf("Error Loading Eye Cascade");
        return -1;
} 
    VideoCapture capture(0);
    if(!capture.isOpened())
    {

        printf("Error opening Video Stream");
        return -1;
    }

    Mat capimg,greyimg;
    vector<Rect> faces,eyes;

    while(1)
    {

        capture>>capimg;
        waitKey(10);            
            cvtColor(capimg, greyimg, CV_BGR2GRAY);
            cv::equalizeHist(greyimg,greyimg);
        face.detectMultiScale(greyimg, faces, 1.1, 10, CV_HAAR_SCALE_IMAGE | CV_HAAR_DO_CANNY_PRUNING, cvSize(0,0), cvSize(300,300));

        for(int i=0; i < faces.size(); i++)
        {

            Point pt1(faces[i].x+faces[i].width,faces[i].y+faces[i].height);
            Point pt2(faces[i].x,faces[i].y);
            Mat faceroi=greyimg(faces[i]);
            eye.detectMultiScale(faceroi, eyes,1.1, 2, 0|CV_HAAR_SCALE_IMAGE, Size(30,30));
            for(size_t j=0; j<eyes.size(); j++)
            {

                Point center(faces[i].x+eyes[j].x+eyes[j].width*0.5,faces[i].y+eyes[j].y+eyes[j].height*0.5);
                int radius = cvRound((eyes[j].width+eyes[j].height)*0.25);
                circle(capimg, center, radius, Scalar(255,0,0),2,8,0);
            }
            rectangle(capimg, pt1, pt2, cvScalar(0,255,0),2,8,0);
        }
        imshow("Result",capimg);
        waitKey(3);
        char c= waitKey(3);
        if (c==27)
        break;

    }
return 0;

}


2016-02-08 12:32:32 -0600 received badge  Scholar (source)
2016-02-08 12:27:00 -0600 asked a question How the 3 basic Haar features are formed from the Haar wavelet ?

I have been digging a lot and to this point I know exactly how Viola-Jones algorithm works and how the haar cascade file is prepared. I am more interested in knowing the fact that how the 3 basic haar features are formed, and how they are derived using the haar wavelet, and why only that specific three ?

2016-01-27 01:57:06 -0600 asked a question Measure White Pixels in an image

I have extracted eyes from face using Haar Cascade. Now I want to measure the number of white pixels in the extracted eye image. Please Help . . . .

int main()
{
CascadeClassifier face, eye;
if(!face.load("C:\\HAAR\\haarcascade_frontalcatface.xml")){

    printf("Error Loading Face Cascade");
        return -1;
}

    if(!eye.load("C:\\HAAR\\haarcascade_eye_tree_eyeglasses.xml")){

    printf("Error Loading Eye Cascade");
        return -1;
} 
    VideoCapture capture(0);
    if(!capture.isOpened())
    {

        printf("Error opening Video Stream");
        return -1;
    }

    Mat capimg,greyimg;
    vector<Rect> faces,eyes;

    while(1)
    {

        capture>>capimg;
        waitKey(10);            
            cvtColor(capimg, greyimg, CV_BGR2GRAY);
            cv::equalizeHist(greyimg,greyimg);
        face.detectMultiScale(greyimg, faces, 1.1, 10, CV_HAAR_SCALE_IMAGE | CV_HAAR_DO_CANNY_PRUNING, cvSize(0,0), cvSize(300,300));

        for(int i=0; i < faces.size(); i++)
        {

            Point pt1(faces[i].x+faces[i].width,faces[i].y+faces[i].height);
            Point pt2(faces[i].x,faces[i].y);
            Mat faceroi=greyimg(faces[i]);
            eye.detectMultiScale(faceroi, eyes,1.1, 2, 0|CV_HAAR_SCALE_IMAGE, Size(30,30));
            for(size_t j=0; j<eyes.size(); j++)
            {

                Point center(faces[i].x+eyes[j].x+eyes[j].width*0.5,faces[i].y+eyes[j].y+eyes[j].height*0.5);
                int radius = cvRound((eyes[j].width+eyes[j].height)*0.25);
                circle(capimg, center, radius, Scalar(255,0,0),2,8,0);
            }
            rectangle(capimg, pt1, pt2, cvScalar(0,255,0),2,8,0);
        }
        imshow("Result",capimg);
        waitKey(3);
        char c= waitKey(3);
        if (c==27)
        break;

    }
return 0;

}
2016-01-27 01:36:05 -0600 commented answer Save detected eyes in form of images

The solution Works.