LightBuzz / Vitruvius

A set of easy-to-use Kinect utilities that will speed-up the development of your projects.
http://vitruviuskinect.com
Apache License 2.0
229 stars 82 forks source link

warning on runtime #25

Closed rahulsiwach closed 8 years ago

rahulsiwach commented 8 years ago

giving warning on using code of hand tracking from your blog and using it in other programme. Severity Code Description Project File Line Suppression State Warning "There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "LightBuzz.Vitruvius, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project." rahul_1

on using release this warning is coming and there are no errors in code but the colour image in not appearing in the window, it is coming blank on using debug this warning is not coming but still no colour image is coming. kinect sensor is not starting in either case

birbilis commented 8 years ago

There is a prefer 32-bit flag in your project build settings. I remember I had issue with a Kinect v1 project. Try toggling it

Vangos commented 8 years ago

It's too generic, but if you are deploying a Windows Store (WinRT) app, you need to explicitly set your target to "x86" or "x64".

rahulsiwach commented 8 years ago

basically the main problem is I am using this code to get colour image and no error or warning is coming but on running no colour stream is coming, nor the kinect sensor is getting started(3 lights don't lit up)....... this is my code(your code from handtracking)..............

namespace rahul_1 { ///

/// Interaction logic for MainWindow.xaml
/// </summary>

public partial class MainWindow : Window
{
    #region Members

    KinectSensor _sensor;
    MultiSourceFrameReader _reader;
    #endregion

    #region Constructor

    public MainWindow()
    {
        InitializeComponent();
    }

    #endregion

    #region Event handlers

    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        _sensor = KinectSensor.GetDefault();

        if (_sensor != null)
        {
            _sensor.Open();

            _reader = _sensor.OpenMultiSourceFrameReader(FrameSourceTypes.Color | FrameSourceTypes.Depth | FrameSourceTypes.Infrared | FrameSourceTypes.Body);
            _reader.MultiSourceFrameArrived += Reader_MultiSourceFrameArrived;
        }
    }

    private void Window_Closed(object sender, EventArgs e)
    {
        if (_reader != null)
        {
            _reader.Dispose();
        }

        if (_sensor != null)
        {
            _sensor.Close();
        }
    }

    void Reader_MultiSourceFrameArrived(object sender, MultiSourceFrameArrivedEventArgs e)
    {
        var reference = e.FrameReference.AcquireFrame();

        // Color
        using (var frame = reference.ColorFrameReference.AcquireFrame())
        {
            if (frame != null)
            {
                camera.Source = frame.ToBitmap();
            }
        }
    }

    #endregion
}

}

Xaml code is..........

text.txt

birbilis commented 8 years ago

Are the samples working ok for you?

rahulsiwach commented 8 years ago

yes it is working fine absolutely perfect

birbilis commented 8 years ago

Can you post your project to try it?

rahulsiwach commented 8 years ago

yipee......it worked thnx very much u kept me going till now.....and problem was with extension file

birbilis commented 8 years ago

Shouldn't this issue be closed?

Vangos commented 8 years ago

It should be closed. The author reopened.

birbilis commented 8 years ago

Probably did by accident