.net - The type or namespace name could not be found, Beginner in C# -
Hello, I'm the first in C # and I'm trying an online example to use the Kinect for Windows device.
I think the problem is in my context but I do not know what to do
I think that. There is something like the Net framework, as the example seems to be based on old versions of the framework
PS: I have given reference to "Direct Regions"
Connection DLL and project references :
Microsoft. Sisaarpi Microsoft.Kinect system System.ComponentModel.Composition System.ComponentModel.DataAnnotations System.Core System.Data System.Data.DataSetExtensions System.Deployment System.Drawing System.Runtime.DurableInstancing System.Runtime.Remoting System.Runtime.Serialization System.Windows .
Error 1: form system. Type or namespace name 'runtime' line 20 could not be found
e rror 2: type or name space name 'ImageFrameReadyEventArgs' could not be found 43
Error 2: type Or name name 'PlanarImage' could not be found on line 50
Here is the code:
using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Linq; Using System.Text; Using System.Windows.Forms; Using System.Drawing.Imaging; Using System.Runtime.InteropServices; Use of Microsoft Namespace Halokinctworld {Public Partial Category Form 1: Form {Runtime Noe = Runtime.Connects [0]; Public Form 1 () {Initialization (); } Private Zero form1_load (object sender, eventarges e) {nui.Initialize (RuntimeOptions.UseColor); Nui.VideoStream.Open (ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color); Nui.VideoFrameReady + = new event handler & lt; ImageFrameReadyEventArgs & gt; (Frame read); } Zero Frame-Read (Object Sender, Image Frame ReadEurge E) {PlanarImage Image = e.ImageFrame.Image; Bitmap BMAP = imagezobotmap (image); PictureBox1.Image = bmap; } Bitmap PImageToBitmap (PlanarImage PImage) {bitmap bmap = new Bitmap (PImage.Width, PImage.Height, PixelFormat.Format32bppRgb); BitmapData bmapdata = bmap.LockBits (new rectangle (0, 0, PImage.Width, PImage.Height), ImageLockMode.WriteOnly, bmap.PixelFormat); IntPtr ptr = bmapdata.Scan0; Marshall.Copy (PImage.Bits, 0, ptr, PImage.Width * PImage.BytesPerPixel * PImage.Height); bmap.UnlockBits (bmapdata); Return BMAP; } Private Zero Button 1_Click (Object Sender, EventArgs e) {nui.NuiCamera.ElevationAngle + = 4; } Private Zero Button 2_Click (Object Sender, EventArgs e) {nui.NuiCamera.ElevationAngle - = 4; } Private Zero Form 1_formclosing (Object Sender, FormClosingEventArgs e) {nui.Uninitialize (); }}}}
Which version of the Connect SDK you are using? In the latest version ( 1.8 ), Run most KinectSensor, will ImageFrameReadyEventArgs ColorFrameReadyEventArgs (Or AllFramesReadyEventArgs) and PlanarImage will be ColorImage .
Comments
Post a Comment