Face detection with C#.Net problem

Face detection with C#.Net problem

imagem de Rupam D.

Hello all.

I have been working with Intel Perceptual SDK for couple of dys. I have got the gesture to work perfectly and precisely. But having problem with face detection.

I have posted my comment here:

http://software.intel.com/en-us/articles/intel-perceptual-computing-sdk-...

with code that I have done. Can somebody please explain me what I am missing? by the way I am using vs 2010.

When you replace 'I' with 'We', even illness becomes wellness
3 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de MasDennis

Hi Rupam,

I fixed this by adding a null check to pxcmface.cpp:

Open the libpxcclr.sln file in Visual Studio (in program files/Intel/PCSDK/framework/CSharp/libpxcclr/).
Open the pxcmface.cpp file and change line 177 (PXCMFaceAnalysis::ProcessImageAsync) from this:

for (int i=0;iLength;i++) images2[i]=images[i]->QueryInstance();

To:

for (int i=0;iLength;i++) if(images[i] != nullptr) images2[i]=images[i]->QueryInstance();

Now compile the .dll and rebuild your c# application.

imagem de Rupam D.

Hello MasDennis.

Thank you so much for your answer. You showed me the actual cause of problem. Here is my simple work around without touching the dll which I inferred from your solution. Basically in PXCMImages images[] we are allocating 4 instances and there are no null check in actual dll. However if you observe the trace, every time only images[0] is a valid instance and others are null.

So I changed one line in C# solution rather than recompiling dll, which I do not prefer as product update makes it difficult to manage those changes.

Anybody else having a trouble, please call the ProcessImageAsync in following way


    sts = fa.ProcessImageAsync(new PXCMImage[]{images[0]}, out sps[1]);

Observe that I am passin only the first instance here.

When you replace 'I' with 'We', even illness becomes wellness

Faça login para deixar um comentário.