Ask Your Question

MH's profile - activity

2013-09-09 05:08:19 -0500 commented answer Super-Resolution can't process first frame

Thanks for that. Definitely cleared things up :)

2013-09-09 05:07:37 -0500 received badge  Supporter (source)
2013-09-09 05:07:30 -0500 received badge  Scholar (source)
2013-09-08 01:21:28 -0500 asked a question Super-Resolution can't process first frame

Hey,

I am hoping to try out the SuperResolution feature included in OpenCV however i am having a bit of trouble with it. I believe it is the same issue as this question, i just have a few extra questions i'd like answered. I am testing it on the Megamind.avi video located in ..\opencv\samples\cpp\tutorial_code\HighGUI\video-input-psnr-ssim\video It is 720x528, 11seconds long and has a frame rate of 23frames/second.

Basically the issue i am having is when i call nextFrame() the memory usage shoots up 2GB and the CPU usage is at 100%, i have had it running for over an hour now and it is still processing as i type. For an 11second video this seems unreasonable?

Now my questions:

  • Is the code i have posted correct? any tips for improving performance?
  • If the answer to the question i linked to is correct, Is the initialization time static, linear or does it increase exponentially. If it is not static i would find it pretty hard to stomach.
  • Would real time processing be possible with GPUs?(I have tesla cards at work that i can use)
  • If this is the expected result then is this function only really designed for 10-20 frames or something?

My Code:

    Ptr<SuperResolution> superRes;
superRes = createSuperResolution_BTVL1();
Ptr<FrameSource> frameSource;
frameSource = createFrameSource_Video("D:\\Megamind.avi");
Mat frame;
frameSource->nextFrame(frame);
superRes->setInput(frameSource);
for (int i = 0;; ++i)
{
    Mat result;
    //Calling nextFrame() is what is causing me the issue
    superRes->nextFrame(result);
    imshow("Super Resolution", result);
    if (result.empty())
    {
        break;
    }
    waitKey(500);
}

Really appreciate any input you can give.

2013-05-12 08:59:56 -0500 commented question Face recognition - Get distance for all trained images

Yeah that does seem to be what i am looking for!, i shall give it a go when i get home.

Thanks for that, it's very helpful :)

2013-05-12 06:50:26 -0500 commented question Face recognition - Get distance for all trained images

That's just an example, i do have a large database of images. I am doing a study where i require all of the results. And in real life if you have a large database it is possible to have multiple images with very close scores. So if that's the case the close matches should then be displayed to the user to allow them to decide.

2013-05-12 01:03:14 -0500 received badge  Editor (source)
2013-05-12 01:01:59 -0500 asked a question Face recognition - Get distance for all trained images

Hi,

I have just begun using OpenCV in the past week and i am hoping to get a little advice :).

I am currently using the FaceRecognizer to train a set of images and then use predict to compare a face against that trained set of images. This appears to be working fine, however it only retrieves the label with the best score whereas I was hoping to be able to retrieve the score and label for each trained image.

So say i have trained 10 images, i then have an image i want to compare against that trained set of images. My ideal output would be.

img1, distance

img2, distance

img3, distance

etc..

Is this possible?

Im not sure if it makes a big difference but i want to use each technique available and test the results. So Eigenfaces, Fisherfaces and LBP

So essentiall what im doing is.

Ptr<FaceRecognizer> model = createLBPHFaceRecognizer();
model->train(images , labels);
int predictedLabel;
double distance;
model->predict(testSample , predictedLabel , distance);

And essentially what i want is an array of labels and array of distance returned. Which isn't how it works haha.