none
HdFaceBuilder_CollectionCompleted is never called RRS feed

  • General discussion

  •  

    I changed the method and inclusive put in a breakpoint and never stop.

    private void HdFaceBuilder_CollectionCompleted(object sender, FaceModelBuilderCollectionCompletedEventArgs e)
            {
                var modelData = e.ModelData;

                currentFaceModel = modelData.ProduceFaceModel();

                string faceText = string.Empty;

                faceText = "Hair Color: " + currentFaceModel.HairColor.ToString() + '\n';
                faceText += "Skin Color: " + currentFaceModel.SkinColor.ToString() + '\n';
                faceText += "Scale: " + ((float)currentFaceModel.Scale).ToString() + '\n';

                Console.WriteLine(faceText);


                faceModelBuilder.Dispose();
                faceModelBuilder = null;

            }

     private void HdFaceReader_FrameArrived(object sender, HighDefinitionFaceFrameArrivedEventArgs e)
            {
                string faceText = string.Empty;
                    using (var frame = e.FrameReference.AcquireFrame())
                    {
                        // We might miss the chance to acquire the frame; it will be null if it's missed.
                        // Also ignore this frame if face tracking failed.
                        if (frame != null && frame.IsFaceTracked)
                        {

                            faceText = "Hair Color: " + currentFaceModel.HairColor.ToString() + '\n';
                            faceText += "Skin Color: " + currentFaceModel.SkinColor.ToString() + '\n';
                            faceText += "Scale: " + ((float)currentFaceModel.Scale).ToString() + '\n';

                            frame.GetAndRefreshFaceAlignmentResult(currentFaceAlignment);

                            Console.WriteLine(faceText);

    }

    }

    }

    And the result always is:

    Hair Color: 0

    Skin Color: 0 

    Scale: 1

    And HairColor and SkinColor  is type IUnits ... Should be Color?

    All FaceShapeDeformations  is cero too.

    Sorry for my english, isn't my matther language.

    Thanks

    Victor

    Tuesday, February 3, 2015 2:03 AM

All replies

  • You need to create a windowed application so the message pump can correctly handle the event. Does the WPF/Xaml store application work?

    Carmine Sirignano - MSFT

    Tuesday, February 3, 2015 5:55 PM
  • I have a windowed application.

    I install HDFaceBasics-WPF and only put a breakpoint in HdFaceBuilder_CollectionCompleted and never stop.

    And I don´t know if that's the reason so the FaceModel propertys are cero.

    Thanks for your quick reply.

    Victor

    Wednesday, February 4, 2015 10:07 PM
  • What is your graphics driver? Can you run the IR basics and ensure you are getting IR data? If you are running the NVidia GPU you have to have the latest graphics driver installed.

    Carmine Sirignano - MSFT

    Thursday, February 5, 2015 6:47 PM
  • I have a Nvidia GeForce GTX 770. I can Run IR basic. And I getting IR data. I have the latest graphics driver installed. This computer run with Windows 8.1 Pro N, when I stated to work whith Kinect, Kinect doesn't work because Windows 8.1 Pro N doesn´t have any dll. May be this is the reason of the problem. Thanks Victor
    Saturday, February 7, 2015 6:42 PM
  • You need to install the media pack if you are running the N version of windows.

    http://www.microsoft.com/en-us/download/details.aspx?id=30685


    Carmine Sirignano - MSFT

    Monday, February 9, 2015 7:24 PM
  • I installed  the media pack and the problem isn´t resolved. 

    I continue investigate.

    Thank you.

    Victor


    Tuesday, February 17, 2015 3:27 PM