c# - How are writeable bitmaps used with the kinect in VS 2013 wpf applications to hold video information? -
I'm looking at the original sample colors from the Kinect Developers Toolkit
Tax ; Using System.Collections.Generic; Using System.Linq; Using System.Text; Using System.IO; System usage threading. Task; Using System.Windows; Using System.Windows.Controls; Using System.Windows.Data; Using System.Windows.Documents; Using System.Windows.Input; System.Windows.Media; System.Windows.Media Using imaging; Using System.Windows.Navigation; Using System.Windows.Shapes; Use of Microsoft Use of Microsoft Keyboard. Tulkit; Using Microsoft Kinect.Toolkit.Controls; Namespace BrianCollarveier {Public Partial Class Main Window: Window {KinectSensor Sensor; Writeable bitmap color bitmap; Byte [] color pixel; Public Manvindo () {Initialization (); } Private Video Windowloaded (object sender, routing events, E) {foreach (various capacities in connect sensor kinetensor) {if (potential status == connectstats.connected} {sensor = potential; break; }} If (null! = Sensor) {sensor.ColorStream.Enable (ColorImageFormat.RgbResolution1280x960Fps12); ColorPixels = new byte [sensor. ColorStream.FramePixelDataLength]; ColorBetaCap = new writable bitmap (sensor.colorstream.framewidth, sensor.colorstream.framhite, 96.0, 96.0, pixelformat.big 32, blank); Image. Source = color bitmap; Sensor Collarframeredi = censorgolphremridi;
and trying to fully understand the writeable bitmap
feature. According to MSDN (), there are input pixels for a writeable bitmap Width: The desired width of the bitmap pixelight: the desired height of the bitmap: DPIX: horizontal dots per bitpin (dpi) DPI: vertical dots per inch (dpi) pixel format: bitmap System of Windows Media. Pixel format Palette: System. Windows Media. Imaging Bitmap bitmap potate
In the sample code I understand pixel width and height, although I do not know how DPIX and DPIE was generated. Additionally, I do not understand the call to call the PixelFormats.Bgr32
or zero
variable to the palette parameter.
Because of my interest in writing billable, it is because I am thinking that if you can save 2 and compare them with each other, to see how two different images Are there. Therefore, I am trying to understand them completely. Thanks!
A writeable bitmap can be used to write a new byte to update the UI. This allows us to use the same writeable bitmap and use similar resources in memory, but only update the content.
In me, I understand that in which scenario you can use it!
Comments
Post a Comment