Find a show you like and click the
button. The show will be added to your My Playlist page and updated 24/7 with new videos.
Search Results
0 Views
00:00:00 02/09/12
Hanging Art Work
[LESS INFO] 0 VIEWS | ADDED 00:00:00 02/09/12
Don’t Leave Your Artwork Hanging! Look For Clever Ways To Display Your Favorite Photos And Art Pieces. Lean Family Snapshots Along A Shallow Picture Ledge, Or Hang A Flea Market Frame On The Wall With Your Favorite Postcard Floating In The Middle. Use Ribbon, Wire, Or Decorative Pins To Show Off Your Prized Posessions. Symmetric Displays Appear More Organized And Formal While Free Flow Arrangements Feel Casual And Fun.
0 Views
09:37:12 01/24/12
Chapter 7: 'Stretched Thin' - Introduction
[LESS INFO] 0 VIEWS | ADDED 09:37:12 01/24/12
Chapter 7: 'Stretched Thin' - Introduction
This chapter has you playing with water balloons along with everything else you've encountered throughout the game. Balloons can be filled with either water or poison. Balloons filled with poison will be marked with a skull, naturally. Also, balloons can travel over almost anything, including moss. They can even be filled with steam to float up. Be careful, though. If you hit a patch of spikes or a puddle of green ooze, your balloon will pop, potentially wasting all of your precious water. Read more by visiting our page at: www.mahalo.com From: MahaloVideoGames Views: 11 1 ratings Time: 00:28 More in Gaming
17 Views
18:24:01 12/17/11
Top 5 Games For The Hardcore Gamer - Press Pause Daily
[LESS INFO] 17 VIEWS | ADDED 18:24:01 12/17/11
Jaime, the Press Pause Christmas Elf is here with a Top 5 list of games to get the hardcore gamer on your Christmas list.
SHOW NOTES:
5.
At number five we have L.A. Noire.
This game places you in the shoes of a cop in 1940’s Los Angeles as you solve crimes, and work your way up the ladder of the LAPD.
This game comes from Rockstar, who is well known for their gritty crime games. It features an engrossing story, and the graphics are some of the best out there.
4.
At number four is the sequel to one of 2009’s best games: Batman Arkham Asylum.
Batman Arkham City picks up a year after the events of the last game. Since then, a large section of Gotham has been sectioned off and turned into a prison for all of the worst of the worst.
The story finds Batman going into Arkham City to discover why the prison was built, and what it’s new warden, Hugo Strange is up to.
Bottom line, it’s Batman, his most famous rouge’s gallery, and a LOT of ass kicking. What more do you need. And hey...everyone wants to be batman.
3.
At number three we have a game that has been shattering sales records across the board: Modern Warfare 3. The latest in Activision’s massively successful Call of Duty series begins exactly where Moder Warfare 2 left off. You will play as several characters as you battle the forces of Russian Ultranationalist Vladimir Makarov.
If your gamer loves the thrill of shooter action, then this is the game for you. They will work their way through an intense single player story, and then they can take the battle online to test their skills against the world.
2.
At number two we have the latest in the long running Legend of Zelda series: Skyward Sword.
This story is set at one of the earliest points in this series’ long running continuity, taking place many years before the events of The Ocarina Of Time.
The game starts off in a floating city of Skyloft. Again you play as a character named Link as he sets out to save his friend Zelda from forces unknown, and have many adventures along the way.
This is the first game made especially for the Wii system, and utilizes the Wii Motion Plus for accurate controls. If your gamer loves Nintendo and the Zelda series, you can’t do wrong with this game.
1.
And last, at number one we have a game that needs no introduction. It is of course The Elder Scrolls V: Skyrim.
There are of course millions of people who have been engrossed in the latest game in Bethesda’s long running game series.
Set 200 years after the end of the last game, you play as a “Dragonborn” as you venture out to defeat Alduin. You will travel the land of Skyrim, which is in the midst of a civil war after the assassination of it’s High King.
Your gamer will find a large open world to play in, non linear gameplay, and many quests to finish. This game will keep your gamer engrossed for hours and hours.
So if they are fans of a good RPG, then this is a definite no-brainer.
Well that will do it for our list of games for the hardcore gamer on your shopping list. We hope that this will be helpful to you, and we hope that you holidays are very special for you and yours. From our family to yours. Happy Holidays.
3 Views
17:38:13 08/12/11
Venture Shift 2011 - Floating Point - Leah Busque from Task Rabbit
[LESS INFO] 3 VIEWS | ADDED 17:38:13 08/12/11
The new era of venture investing
There has been an emergence of a shadow venture system over the past several years as angels have institutionalized, yesterday's successful multi-millionaire entrepreneurs have become a legitimate capital market, and incubators have re-entered the funding formation process in droves. In the later stages, a few traditional VCs are turning into mutual funds. Add DST and secondary markets, and the world of investing has profoundly changed.
For more information, click here.
Join us on the evening of July 20, 2011 in San Francisco along with top angels, venture capitalists and entrepreneurs to explore the changes disrupting the VC industry.
The questions to explore are: How do these developments change the VC game and capital-formation process and exit dynamics? How are the rise of angels, super angels, incubators changing the stakes across the board? Are 10x returns elusive? How are secondary markets adding value?
This event is ideal for entrepreneurs seeking to understand the new world order of venture financing from start to finish. Super angels and angels and venture capitalists should also join the event to mingle and connect with fellow investors shaping the new era of venture investing.
See speakers here . The final agenda is here .
1 Views
17:01:42 08/12/11
Venture Shift 2011 - Floating Point - Alex Bard from Assistly
[LESS INFO] 1 VIEWS | ADDED 17:01:42 08/12/11
The new era of venture investing
There has been an emergence of a shadow venture system over the past several years as angels have institutionalized, yesterday's successful multi-millionaire entrepreneurs have become a legitimate capital market, and incubators have re-entered the funding formation process in droves. In the later stages, a few traditional VCs are turning into mutual funds. Add DST and secondary markets, and the world of investing has profoundly changed.
For more information, click here.
Join us on the evening of July 20, 2011 in San Francisco along with top angels, venture capitalists and entrepreneurs to explore the changes disrupting the VC industry.
The questions to explore are: How do these developments change the VC game and capital-formation process and exit dynamics? How are the rise of angels, super angels, incubators changing the stakes across the board? Are 10x returns elusive? How are secondary markets adding value?
This event is ideal for entrepreneurs seeking to understand the new world order of venture financing from start to finish. Super angels and angels and venture capitalists should also join the event to mingle and connect with fellow investors shaping the new era of venture investing.
See speakers here . The final agenda is here .
61 Views
04:10:13 08/08/11
A Design Problem From A Viewer In Pune India
[LESS INFO] 61 VIEWS | ADDED 04:10:13 08/08/11
We were very excited to have recently received an email from Pune India. It was written by Teju, a regular Slow Home viewer. He had a few questions about the design of the new house that he is currently building and he sent along the floor plans. The following is an excerpt from his email: “Dear John and Matthew, I would like to discuss our house in Pune, India with the Slow home community. Attached are our proposed plans, This is a new build (11 storey structure with our unit a duplex at ground floor) and the construction is reinforced concrete (the most common technique in India) with brick walls. We are a family of 5 with our son and my mom and dad staying with us. We have a lot of relatives and friends staying close by, so guests with kids will be very common at our place. Our main issue right now is the location of the dining table. There is no obvious location for it and somehow looks like it is floating anywhere in the room. We are considering the option of having a moveable dining table which can be moved into the garden area for parties. The second issue is the living room layout. It needs to be flexible enough to accommodate 6- 10 people. I was inspired by some of your past few design minutes with mill work and dining area and staircases in focus and have come up with few options myself and would eventually like to share those too”. For exclusive video and resources about today's video visit: www.slowhomestudio.com
0 Views
17:13:57 07/08/11
Hero
[LESS INFO] 0 VIEWS | ADDED 17:13:57 07/08/11
Johnson and his girlfriend, Kelly Lilledahl, were walking along the Mississippi River at Red Wing's Levee Park when he saw someone floating in the river. Without thinking, he ran down a floating dock, took off his shoes and jumped in. "It was the easiest decision I ever made in my life," he said.
25 Views
17:15:36 06/16/11
Working with Depth Data
[LESS INFO] 25 VIEWS | ADDED 17:15:36 06/16/11
This video covers the basics of using depth data from Kinect. You may find it easier to follow along by downloading the Kinect for Windows SDK Quickstarts samples and slides .
* [ 00:43 ] Depth data overview
* [ 04:56 ] Initializing the Kinect Runtime
* [ 05:46 ] Using the depth data to create an image
* [ 12:13 ] Using the PlayerIndex Setup
The steps below assume you have setup your development environment as explained in the " Setting Up Your Development Environment " video. Task Setup the Depth Camera event
Designing the UI
Add an image with Width=320 and Height=240 as shown below:
XAML
Setup the Depth Camera Event
Create an instance of the Kinect Runtime outside of the Window_Loaded event. Then, initialize the Runtime to use DepthAndPlayerIndex and UseSkeletalTracking . Finally register for DepthFrameReady event and open the Depth stream as shown below.
C#
//Kinect Runtime Runtime nui = new Runtime(); private void Window_Loaded(object sender, RoutedEventArgs e) { //UseDepthAndPlayerIndex and UseSkeletalTracking nui.Initialize(RuntimeOptions.UseDepthAndPlayerIndex | RuntimeOptions.UseSkeletalTracking); //register for event nui.DepthFrameReady += new EventHandler(nui_DepthFrameReady); //DepthAndPlayerIndex ImageType nui.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution320x240, ImageType.DepthAndPlayerIndex); } void nui_DepthFrameReady(object sender, ImageFrameReadyEventArgs e) {}
Visual Basic
Private nui As New Runtime Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) 'UseDepthAndPlayerIndex and UseSkeletalTracking nui.Initialize(RuntimeOptions.UseDepthAndPlayerIndex Or RuntimeOptions.UseSkeletalTracking) 'register for event AddHandler nui.DepthFrameReady, AddressOf nui_DepthFrameReady 'DepthAndPlayerIndex ImageType nui.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution320x240, ImageType.DepthAndPlayerIndex) End Sub Private Sub nui_DepthFrameReady(ByVal sender As Object, ByVal e As ImageFrameReadyEventArgs) End Sub Understanding the PlanarImage byte[] Array
The DepthFrameReady event returns an ImageFrame class that contains a PlanarImage. That PlanarImage contains a byte[] array which contains the distance of each pixel. The array:
* Starts at top left of image
* Moves left to right, then top to bottom
* Represents distance for pixel Calculating Distance
Because there are 2 bytes per pixel (16 bits) representing the distance, you will need to use bitshift operators to get the distance for a particular pixel. The exact bitshifting depends on the ImageType you use
Depth Image Type
Bitshift second byte left by 8
Distance (0,0) = (int)(Bits[0] | Bits[1] > 3 | Bits[1] > 3 | secondFrame > 3 Or CInt(secondFrame) 0) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 255; colorFrame[index + RedIndex] = 255; }
Visual Basic
If GetPlayerIndex(depthData(depthIndex)) > 0 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 255 colorFrame(index + RedIndex) = 255 End If Setting a monochrome intensity
While the previous examples we hard-coded colors, you can also build a monochrome histogram that scales the color range (0-255) proportionally based on the distance range (850-4000).
To get a monochrome appearance, the intensity is applied equally to all three colors (blue, green, red).
C#
//equal coloring for monochromatic histogram var intensity = CalculateIntensityFromDepth(distance); colorFrame[index + BlueIndex] = intensity; colorFrame[index + GreenIndex] = intensity; colorFrame[index + RedIndex] = intensity; const float MaxDepthDistance = 4000; // max value returned const float MinDepthDistance = 850; // min value returned const float MaxDepthDistanceOffset = MaxDepthDistance - MinDepthDistance; public static byte CalculateIntensityFromDepth(int distance) { //formula for calculating monochrome intensity for histogram return (byte)(255 - (255 * Math.Max(distance - MinDepthDistance, 0) / (MaxDepthDistanceOffset))); }
Visual Basic
'equal coloring for monochromatic histogram Dim intensity = CalculateIntensityFromDepth(distance) colorFrame(index + BlueIndex) = intensity colorFrame(index + GreenIndex) = intensity colorFrame(index + RedIndex) = intensity Private Const MaxDepthDistance As Single = 4000 ' max value returned Private Const MinDepthDistance As Single = 850 ' min value returned Private Const MaxDepthDistanceOffset As Single = MaxDepthDistance - MinDepthDistance Public Shared Function CalculateIntensityFromDepth(ByVal distance As Integer) As Byte 'formula for calculating monochrome intensity for histogram Return CByte(255 - (255 * Math.Max(distance - MinDepthDistance, 0) / (MaxDepthDistanceOffset))) End Function Putting it all together
Using the formulas above, we'll now return a byte[] array that has a color value for each pixel based on if the distance for that pixel:
* > 900 = Blue
* > 900 && 2000 = Red
If the pixel represents a player, the color will be yellow/gold.
C#
private byte[] GenerateColoredBytes(ImageFrame imageFrame) { int height = imageFrame.Image.Height; int width = imageFrame.Image.Width; //Depth data for each pixel Byte[] depthData = imageFrame.Image.Bits; //colorFrame contains color information for all pixels in image //Height x Width x 4 (Red, Green, Blue, empty byte) Byte[] colorFrame = new byte[imageFrame.Image.Height * imageFrame.Image.Width * 4]; //Bgr32 - Blue, Green, Red, empty byte //Bgra32 - Blue, Green, Red, transparency //You must set transparency for Bgra as .NET defaults a byte to 0 = fully transparent //hardcoded locations to Blue, Green, Red (BGR) index positions const int BlueIndex = 0; const int GreenIndex = 1; const int RedIndex = 2; var depthIndex = 0; for (var y = 0; y 900 && distance 2000) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 0; colorFrame[index + RedIndex] = 255; } //Color a player if (GetPlayerIndex(depthData[depthIndex]) > 0) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 255; colorFrame[index + RedIndex] = 255; } //jump two bytes at a time depthIndex += 2; } } return colorFrame; }
Visual Basic
Private Function GenerateColoredBytes(ByVal imageFrame As ImageFrame) As Byte() Dim height As Integer = imageFrame.Image.Height Dim width As Integer = imageFrame.Image.Width 'Depth data for each pixel Dim depthData() As Byte = imageFrame.Image.Bits 'colorFrame contains color information for all pixels in image 'Height x Width x 4 (Red, Green, Blue, empty byte) Dim colorFrame(imageFrame.Image.Height * imageFrame.Image.Width * 4 - 1) As Byte 'Bgr32 - Blue, Green, Red, empty byte 'Bgra32 - Blue, Green, Red, transparency 'You must set transparency for Bgra as .NET defaults a byte to 0 = fully transparent 'hardcoded locations to Blue, Green, Red (BGR) index positions Const BlueIndex As Integer = 0 Const GreenIndex As Integer = 1 Const RedIndex As Integer = 2 Dim depthIndex = 0 For y = 0 To height - 1 Dim heightOffset = y * width For x = 0 To width - 1 Dim index = ((width - x - 1) + heightOffset) * 4 Dim distance = GetDistanceWithPlayerIndex(depthData(depthIndex), depthData(depthIndex + 1)) If distance 900 AndAlso distance 2000 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 0 colorFrame(index + RedIndex) = 255 End If '//Color a player If GetPlayerIndex(depthData(depthIndex)) > 0 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 255 colorFrame(index + RedIndex) = 255 End If 'jump two bytes at a time depthIndex += 2 Next x Next y Return colorFrame End Function
72 Views
17:15:36 06/16/11
Working with Depth Data
[LESS INFO] 72 VIEWS | ADDED 17:15:36 06/16/11
This video covers the basics of using depth data from Kinect. You may find it easier to follow along by downloading the Kinect for Windows SDK Quickstarts samples and slides .
* [ 00:43 ] Depth data overview
* [ 04:56 ] Initializing the Kinect Runtime
* [ 05:46 ] Using the depth data to create an image
* [ 12:13 ] Using the PlayerIndex Setup
The steps below assume you have setup your development environment as explained in the " Setting Up Your Development Environment " video. Task Setup the Depth Camera event
Designing the UI
Add an image with Width=320 and Height=240 as shown below:
XAML
Setup the Depth Camera Event
Create an instance of the Kinect Runtime outside of the Window_Loaded event. Then, initialize the Runtime to use DepthAndPlayerIndex and UseSkeletalTracking . Finally register for DepthFrameReady event and open the Depth stream as shown below.
C#
//Kinect Runtime Runtime nui = new Runtime(); private void Window_Loaded(object sender, RoutedEventArgs e) { //UseDepthAndPlayerIndex and UseSkeletalTracking nui.Initialize(RuntimeOptions.UseDepthAndPlayerIndex | RuntimeOptions.UseSkeletalTracking); //register for event nui.DepthFrameReady += new EventHandler(nui_DepthFrameReady); //DepthAndPlayerIndex ImageType nui.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution320x240, ImageType.DepthAndPlayerIndex); } void nui_DepthFrameReady(object sender, ImageFrameReadyEventArgs e) {}
Visual Basic
Private nui As New Runtime Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) 'UseDepthAndPlayerIndex and UseSkeletalTracking nui.Initialize(RuntimeOptions.UseDepthAndPlayerIndex Or RuntimeOptions.UseSkeletalTracking) 'register for event AddHandler nui.DepthFrameReady, AddressOf nui_DepthFrameReady 'DepthAndPlayerIndex ImageType nui.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution320x240, ImageType.DepthAndPlayerIndex) End Sub Private Sub nui_DepthFrameReady(ByVal sender As Object, ByVal e As ImageFrameReadyEventArgs) End Sub Understanding the PlanarImage byte[] Array
The DepthFrameReady event returns an ImageFrame class that contains a PlanarImage. That PlanarImage contains a byte[] array which contains the distance of each pixel. The array:
* Starts at top left of image
* Moves left to right, then top to bottom
* Represents distance for pixel Calculating Distance
Because there are 2 bytes per pixel (16 bits) representing the distance, you will need to use bitshift operators to get the distance for a particular pixel. The exact bitshifting depends on the ImageType you use
Depth Image Type
Bitshift second byte left by 8
Distance (0,0) = (int)(Bits[0] | Bits[1] > 3 | Bits[1] > 3 | secondFrame > 3 Or CInt(secondFrame) 0) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 255; colorFrame[index + RedIndex] = 255; }
Visual Basic
If GetPlayerIndex(depthData(depthIndex)) > 0 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 255 colorFrame(index + RedIndex) = 255 End If Setting a monochrome intensity
While the previous examples we hard-coded colors, you can also build a monochrome histogram that scales the color range (0-255) proportionally based on the distance range (850-4000).
To get a monochrome appearance, the intensity is applied equally to all three colors (blue, green, red).
C#
//equal coloring for monochromatic histogram var intensity = CalculateIntensityFromDepth(distance); colorFrame[index + BlueIndex] = intensity; colorFrame[index + GreenIndex] = intensity; colorFrame[index + RedIndex] = intensity; const float MaxDepthDistance = 4000; // max value returned const float MinDepthDistance = 850; // min value returned const float MaxDepthDistanceOffset = MaxDepthDistance - MinDepthDistance; public static byte CalculateIntensityFromDepth(int distance) { //formula for calculating monochrome intensity for histogram return (byte)(255 - (255 * Math.Max(distance - MinDepthDistance, 0) / (MaxDepthDistanceOffset))); }
Visual Basic
'equal coloring for monochromatic histogram Dim intensity = CalculateIntensityFromDepth(distance) colorFrame(index + BlueIndex) = intensity colorFrame(index + GreenIndex) = intensity colorFrame(index + RedIndex) = intensity Private Const MaxDepthDistance As Single = 4000 ' max value returned Private Const MinDepthDistance As Single = 850 ' min value returned Private Const MaxDepthDistanceOffset As Single = MaxDepthDistance - MinDepthDistance Public Shared Function CalculateIntensityFromDepth(ByVal distance As Integer) As Byte 'formula for calculating monochrome intensity for histogram Return CByte(255 - (255 * Math.Max(distance - MinDepthDistance, 0) / (MaxDepthDistanceOffset))) End Function Putting it all together
Using the formulas above, we'll now return a byte[] array that has a color value for each pixel based on if the distance for that pixel:
* > 900 = Blue
* > 900 && 2000 = Red
If the pixel represents a player, the color will be yellow/gold.
C#
private byte[] GenerateColoredBytes(ImageFrame imageFrame) { int height = imageFrame.Image.Height; int width = imageFrame.Image.Width; //Depth data for each pixel Byte[] depthData = imageFrame.Image.Bits; //colorFrame contains color information for all pixels in image //Height x Width x 4 (Red, Green, Blue, empty byte) Byte[] colorFrame = new byte[imageFrame.Image.Height * imageFrame.Image.Width * 4]; //Bgr32 - Blue, Green, Red, empty byte //Bgra32 - Blue, Green, Red, transparency //You must set transparency for Bgra as .NET defaults a byte to 0 = fully transparent //hardcoded locations to Blue, Green, Red (BGR) index positions const int BlueIndex = 0; const int GreenIndex = 1; const int RedIndex = 2; var depthIndex = 0; for (var y = 0; y 900 && distance 2000) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 0; colorFrame[index + RedIndex] = 255; } //Color a player if (GetPlayerIndex(depthData[depthIndex]) > 0) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 255; colorFrame[index + RedIndex] = 255; } //jump two bytes at a time depthIndex += 2; } } return colorFrame; }
Visual Basic
Private Function GenerateColoredBytes(ByVal imageFrame As ImageFrame) As Byte() Dim height As Integer = imageFrame.Image.Height Dim width As Integer = imageFrame.Image.Width 'Depth data for each pixel Dim depthData() As Byte = imageFrame.Image.Bits 'colorFrame contains color information for all pixels in image 'Height x Width x 4 (Red, Green, Blue, empty byte) Dim colorFrame(imageFrame.Image.Height * imageFrame.Image.Width * 4 - 1) As Byte 'Bgr32 - Blue, Green, Red, empty byte 'Bgra32 - Blue, Green, Red, transparency 'You must set transparency for Bgra as .NET defaults a byte to 0 = fully transparent 'hardcoded locations to Blue, Green, Red (BGR) index positions Const BlueIndex As Integer = 0 Const GreenIndex As Integer = 1 Const RedIndex As Integer = 2 Dim depthIndex = 0 For y = 0 To height - 1 Dim heightOffset = y * width For x = 0 To width - 1 Dim index = ((width - x - 1) + heightOffset) * 4 Dim distance = GetDistanceWithPlayerIndex(depthData(depthIndex), depthData(depthIndex + 1)) If distance 900 AndAlso distance 2000 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 0 colorFrame(index + RedIndex) = 255 End If '//Color a player If GetPlayerIndex(depthData(depthIndex)) > 0 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 255 colorFrame(index + RedIndex) = 255 End If 'jump two bytes at a time depthIndex += 2 Next x Next y Return colorFrame End Function
19 Views
17:15:36 06/16/11
Working with Depth Data
[LESS INFO] 19 VIEWS | ADDED 17:15:36 06/16/11
This video covers the basics of using depth data from Kinect. You may find it easier to follow along by downloading the Kinect for Windows SDK Quickstarts samples and slides .
* [ 00:43 ] Depth data overview
* [ 04:56 ] Initializing the Kinect Runtime
* [ 05:46 ] Using the depth data to create an image
* [ 12:13 ] Using the PlayerIndex Setup
The steps below assume you have setup your development environment as explained in the " Setting Up Your Development Environment " video. Task Setup the Depth Camera event
Designing the UI
Add an image with Width=320 and Height=240 as shown below:
XAML
Setup the Depth Camera Event
Create an instance of the Kinect Runtime outside of the Window_Loaded event. Then, initialize the Runtime to use DepthAndPlayerIndex and UseSkeletalTracking . Finally register for DepthFrameReady event and open the Depth stream as shown below.
C#
//Kinect Runtime Runtime nui = new Runtime(); private void Window_Loaded(object sender, RoutedEventArgs e) { //UseDepthAndPlayerIndex and UseSkeletalTracking nui.Initialize(RuntimeOptions.UseDepthAndPlayerIndex | RuntimeOptions.UseSkeletalTracking); //register for event nui.DepthFrameReady += new EventHandler(nui_DepthFrameReady); //DepthAndPlayerIndex ImageType nui.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution320x240, ImageType.DepthAndPlayerIndex); } void nui_DepthFrameReady(object sender, ImageFrameReadyEventArgs e) {}
Visual Basic
Private nui As New Runtime Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) 'UseDepthAndPlayerIndex and UseSkeletalTracking nui.Initialize(RuntimeOptions.UseDepthAndPlayerIndex Or RuntimeOptions.UseSkeletalTracking) 'register for event AddHandler nui.DepthFrameReady, AddressOf nui_DepthFrameReady 'DepthAndPlayerIndex ImageType nui.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution320x240, ImageType.DepthAndPlayerIndex) End Sub Private Sub nui_DepthFrameReady(ByVal sender As Object, ByVal e As ImageFrameReadyEventArgs) End Sub Understanding the PlanarImage byte[] Array
The DepthFrameReady event returns an ImageFrame class that contains a PlanarImage. That PlanarImage contains a byte[] array which contains the distance of each pixel. The array:
* Starts at top left of image
* Moves left to right, then top to bottom
* Represents distance for pixel Calculating Distance
Because there are 2 bytes per pixel (16 bits) representing the distance, you will need to use bitshift operators to get the distance for a particular pixel. The exact bitshifting depends on the ImageType you use
Depth Image Type
Bitshift second byte left by 8
Distance (0,0) = (int)(Bits[0] | Bits[1] > 3 | Bits[1] > 3 | secondFrame > 3 Or CInt(secondFrame) 0) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 255; colorFrame[index + RedIndex] = 255; }
Visual Basic
If GetPlayerIndex(depthData(depthIndex)) > 0 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 255 colorFrame(index + RedIndex) = 255 End If Setting a monochrome intensity
While the previous examples we hard-coded colors, you can also build a monochrome histogram that scales the color range (0-255) proportionally based on the distance range (850-4000).
To get a monochrome appearance, the intensity is applied equally to all three colors (blue, green, red).
C#
//equal coloring for monochromatic histogram var intensity = CalculateIntensityFromDepth(distance); colorFrame[index + BlueIndex] = intensity; colorFrame[index + GreenIndex] = intensity; colorFrame[index + RedIndex] = intensity; const float MaxDepthDistance = 4000; // max value returned const float MinDepthDistance = 850; // min value returned const float MaxDepthDistanceOffset = MaxDepthDistance - MinDepthDistance; public static byte CalculateIntensityFromDepth(int distance) { //formula for calculating monochrome intensity for histogram return (byte)(255 - (255 * Math.Max(distance - MinDepthDistance, 0) / (MaxDepthDistanceOffset))); }
Visual Basic
'equal coloring for monochromatic histogram Dim intensity = CalculateIntensityFromDepth(distance) colorFrame(index + BlueIndex) = intensity colorFrame(index + GreenIndex) = intensity colorFrame(index + RedIndex) = intensity Private Const MaxDepthDistance As Single = 4000 ' max value returned Private Const MinDepthDistance As Single = 850 ' min value returned Private Const MaxDepthDistanceOffset As Single = MaxDepthDistance - MinDepthDistance Public Shared Function CalculateIntensityFromDepth(ByVal distance As Integer) As Byte 'formula for calculating monochrome intensity for histogram Return CByte(255 - (255 * Math.Max(distance - MinDepthDistance, 0) / (MaxDepthDistanceOffset))) End Function Putting it all together
Using the formulas above, we'll now return a byte[] array that has a color value for each pixel based on if the distance for that pixel:
* > 900 = Blue
* > 900 && 2000 = Red
If the pixel represents a player, the color will be yellow/gold.
C#
private byte[] GenerateColoredBytes(ImageFrame imageFrame) { int height = imageFrame.Image.Height; int width = imageFrame.Image.Width; //Depth data for each pixel Byte[] depthData = imageFrame.Image.Bits; //colorFrame contains color information for all pixels in image //Height x Width x 4 (Red, Green, Blue, empty byte) Byte[] colorFrame = new byte[imageFrame.Image.Height * imageFrame.Image.Width * 4]; //Bgr32 - Blue, Green, Red, empty byte //Bgra32 - Blue, Green, Red, transparency //You must set transparency for Bgra as .NET defaults a byte to 0 = fully transparent //hardcoded locations to Blue, Green, Red (BGR) index positions const int BlueIndex = 0; const int GreenIndex = 1; const int RedIndex = 2; var depthIndex = 0; for (var y = 0; y 900 && distance 2000) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 0; colorFrame[index + RedIndex] = 255; } //Color a player if (GetPlayerIndex(depthData[depthIndex]) > 0) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 255; colorFrame[index + RedIndex] = 255; } //jump two bytes at a time depthIndex += 2; } } return colorFrame; }
Visual Basic
Private Function GenerateColoredBytes(ByVal imageFrame As ImageFrame) As Byte() Dim height As Integer = imageFrame.Image.Height Dim width As Integer = imageFrame.Image.Width 'Depth data for each pixel Dim depthData() As Byte = imageFrame.Image.Bits 'colorFrame contains color information for all pixels in image 'Height x Width x 4 (Red, Green, Blue, empty byte) Dim colorFrame(imageFrame.Image.Height * imageFrame.Image.Width * 4 - 1) As Byte 'Bgr32 - Blue, Green, Red, empty byte 'Bgra32 - Blue, Green, Red, transparency 'You must set transparency for Bgra as .NET defaults a byte to 0 = fully transparent 'hardcoded locations to Blue, Green, Red (BGR) index positions Const BlueIndex As Integer = 0 Const GreenIndex As Integer = 1 Const RedIndex As Integer = 2 Dim depthIndex = 0 For y = 0 To height - 1 Dim heightOffset = y * width For x = 0 To width - 1 Dim index = ((width - x - 1) + heightOffset) * 4 Dim distance = GetDistanceWithPlayerIndex(depthData(depthIndex), depthData(depthIndex + 1)) If distance 900 AndAlso distance 2000 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 0 colorFrame(index + RedIndex) = 255 End If '//Color a player If GetPlayerIndex(depthData(depthIndex)) > 0 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 255 colorFrame(index + RedIndex) = 255 End If 'jump two bytes at a time depthIndex += 2 Next x Next y Return colorFrame End Function
58 Views
17:15:36 06/16/11
Working with Depth Data
[LESS INFO] 58 VIEWS | ADDED 17:15:36 06/16/11
This video covers the basics of using depth data from Kinect. You may find it easier to follow along by downloading the Kinect for Windows SDK Quickstarts samples and slides .
* [ 00:43 ] Depth data overview
* [ 04:56 ] Initializing the Kinect Runtime
* [ 05:46 ] Using the depth data to create an image
* [ 12:13 ] Using the PlayerIndex Setup
The steps below assume you have setup your development environment as explained in the " Setting Up Your Development Environment " video. Task Setup the Depth Camera event
Designing the UI
Add an image with Width=320 and Height=240 as shown below:
XAML
Setup the Depth Camera Event
Create an instance of the Kinect Runtime outside of the Window_Loaded event. Then, initialize the Runtime to use DepthAndPlayerIndex and UseSkeletalTracking . Finally register for DepthFrameReady event and open the Depth stream as shown below.
C#
//Kinect Runtime Runtime nui = new Runtime(); private void Window_Loaded(object sender, RoutedEventArgs e) { //UseDepthAndPlayerIndex and UseSkeletalTracking nui.Initialize(RuntimeOptions.UseDepthAndPlayerIndex | RuntimeOptions.UseSkeletalTracking); //register for event nui.DepthFrameReady += new EventHandler(nui_DepthFrameReady); //DepthAndPlayerIndex ImageType nui.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution320x240, ImageType.DepthAndPlayerIndex); } void nui_DepthFrameReady(object sender, ImageFrameReadyEventArgs e) {}
Visual Basic
Private nui As New Runtime Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) 'UseDepthAndPlayerIndex and UseSkeletalTracking nui.Initialize(RuntimeOptions.UseDepthAndPlayerIndex Or RuntimeOptions.UseSkeletalTracking) 'register for event AddHandler nui.DepthFrameReady, AddressOf nui_DepthFrameReady 'DepthAndPlayerIndex ImageType nui.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution320x240, ImageType.DepthAndPlayerIndex) End Sub Private Sub nui_DepthFrameReady(ByVal sender As Object, ByVal e As ImageFrameReadyEventArgs) End Sub Understanding the PlanarImage byte[] Array
The DepthFrameReady event returns an ImageFrame class that contains a PlanarImage. That PlanarImage contains a byte[] array which contains the distance of each pixel. The array:
* Starts at top left of image
* Moves left to right, then top to bottom
* Represents distance for pixel Calculating Distance
Because there are 2 bytes per pixel (16 bits) representing the distance, you will need to use bitshift operators to get the distance for a particular pixel. The exact bitshifting depends on the ImageType you use
Depth Image Type
Bitshift second byte left by 8
Distance (0,0) = (int)(Bits[0] | Bits[1] > 3 | Bits[1] > 3 | secondFrame > 3 Or CInt(secondFrame) 0) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 255; colorFrame[index + RedIndex] = 255; }
Visual Basic
If GetPlayerIndex(depthData(depthIndex)) > 0 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 255 colorFrame(index + RedIndex) = 255 End If Setting a monochrome intensity
While the previous examples we hard-coded colors, you can also build a monochrome histogram that scales the color range (0-255) proportionally based on the distance range (850-4000).
To get a monochrome appearance, the intensity is applied equally to all three colors (blue, green, red).
C#
//equal coloring for monochromatic histogram var intensity = CalculateIntensityFromDepth(distance); colorFrame[index + BlueIndex] = intensity; colorFrame[index + GreenIndex] = intensity; colorFrame[index + RedIndex] = intensity; const float MaxDepthDistance = 4000; // max value returned const float MinDepthDistance = 850; // min value returned const float MaxDepthDistanceOffset = MaxDepthDistance - MinDepthDistance; public static byte CalculateIntensityFromDepth(int distance) { //formula for calculating monochrome intensity for histogram return (byte)(255 - (255 * Math.Max(distance - MinDepthDistance, 0) / (MaxDepthDistanceOffset))); }
Visual Basic
'equal coloring for monochromatic histogram Dim intensity = CalculateIntensityFromDepth(distance) colorFrame(index + BlueIndex) = intensity colorFrame(index + GreenIndex) = intensity colorFrame(index + RedIndex) = intensity Private Const MaxDepthDistance As Single = 4000 ' max value returned Private Const MinDepthDistance As Single = 850 ' min value returned Private Const MaxDepthDistanceOffset As Single = MaxDepthDistance - MinDepthDistance Public Shared Function CalculateIntensityFromDepth(ByVal distance As Integer) As Byte 'formula for calculating monochrome intensity for histogram Return CByte(255 - (255 * Math.Max(distance - MinDepthDistance, 0) / (MaxDepthDistanceOffset))) End Function Putting it all together
Using the formulas above, we'll now return a byte[] array that has a color value for each pixel based on if the distance for that pixel:
* > 900 = Blue
* > 900 && 2000 = Red
If the pixel represents a player, the color will be yellow/gold.
C#
private byte[] GenerateColoredBytes(ImageFrame imageFrame) { int height = imageFrame.Image.Height; int width = imageFrame.Image.Width; //Depth data for each pixel Byte[] depthData = imageFrame.Image.Bits; //colorFrame contains color information for all pixels in image //Height x Width x 4 (Red, Green, Blue, empty byte) Byte[] colorFrame = new byte[imageFrame.Image.Height * imageFrame.Image.Width * 4]; //Bgr32 - Blue, Green, Red, empty byte //Bgra32 - Blue, Green, Red, transparency //You must set transparency for Bgra as .NET defaults a byte to 0 = fully transparent //hardcoded locations to Blue, Green, Red (BGR) index positions const int BlueIndex = 0; const int GreenIndex = 1; const int RedIndex = 2; var depthIndex = 0; for (var y = 0; y 900 && distance 2000) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 0; colorFrame[index + RedIndex] = 255; } //Color a player if (GetPlayerIndex(depthData[depthIndex]) > 0) { //we are the farthest colorFrame[index + BlueIndex] = 0; colorFrame[index + GreenIndex] = 255; colorFrame[index + RedIndex] = 255; } //jump two bytes at a time depthIndex += 2; } } return colorFrame; }
Visual Basic
Private Function GenerateColoredBytes(ByVal imageFrame As ImageFrame) As Byte() Dim height As Integer = imageFrame.Image.Height Dim width As Integer = imageFrame.Image.Width 'Depth data for each pixel Dim depthData() As Byte = imageFrame.Image.Bits 'colorFrame contains color information for all pixels in image 'Height x Width x 4 (Red, Green, Blue, empty byte) Dim colorFrame(imageFrame.Image.Height * imageFrame.Image.Width * 4 - 1) As Byte 'Bgr32 - Blue, Green, Red, empty byte 'Bgra32 - Blue, Green, Red, transparency 'You must set transparency for Bgra as .NET defaults a byte to 0 = fully transparent 'hardcoded locations to Blue, Green, Red (BGR) index positions Const BlueIndex As Integer = 0 Const GreenIndex As Integer = 1 Const RedIndex As Integer = 2 Dim depthIndex = 0 For y = 0 To height - 1 Dim heightOffset = y * width For x = 0 To width - 1 Dim index = ((width - x - 1) + heightOffset) * 4 Dim distance = GetDistanceWithPlayerIndex(depthData(depthIndex), depthData(depthIndex + 1)) If distance 900 AndAlso distance 2000 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 0 colorFrame(index + RedIndex) = 255 End If '//Color a player If GetPlayerIndex(depthData(depthIndex)) > 0 Then 'we are the farthest colorFrame(index + BlueIndex) = 0 colorFrame(index + GreenIndex) = 255 colorFrame(index + RedIndex) = 255 End If 'jump two bytes at a time depthIndex += 2 Next x Next y Return colorFrame End Function
0 Views
01:23:00 05/23/11
Video: Man Rescued from River
[LESS INFO] 0 VIEWS | ADDED 01:23:00 05/23/11
The rapidly flowing river is a dangerous place to be. That message was driven home this afternoon when a Minot man, who was kayaking on the Mouse in southeast Minot, was tossed into the river when his kayak capsized. The boat floated away, leaving 49-year-old Phillip Shaw clinging to a tree along the edge of the river. The tree was in an area that had filled with several feet of water, stranding the man there. Fire department rescue crews used an inflatable boat to row out to Shaw and bring him to safety. Officials also had an air boat enroute from the Upper Souris National Wildlife Refuge in case the inflatable boat rescue failed. Shaw was not injured.
0 Views
03:42:27 03/18/11
Man's Body Found Along Licking River
[LESS INFO] 0 VIEWS | ADDED 03:42:27 03/18/11
Man's Body Found Along Licking River
The coroner will determine the cause of death for a man found floating in the Licking River in Covington. From: wlwttv Views: 17 0 ratings Time: 01:25 More in News & Politics
11 Views
18:43:15 03/17/11
Tall Ships: The Privateer Lynx - Trailer
[LESS INFO] 11 VIEWS | ADDED 18:43:15 03/17/11
Trailer for 51 minute HD documentary. VIDEO DOWNLOAD: $12.99 The tall ship Privateer Lynx is a powerful 122 foot Top Sail Schooner that looks like an apparition from the past. In reality, she is a modern sailing ship inspired by an earlier Lynx built in 1812 that served as a high tech war machine of her day. The ship"s story is that of a young America, fighting to free herself from English domination. With virtually no navy but plenty of Yankee ingenuity, American Privateers like the Lynx battled the British empire to a draw. Today"s Lynx is a floating educational platform bringing history, the wonders of sailing, and the state of the environment into sharp focus for both school children and adults. Sail with Lynx from Los Angles to San Francisco. Along the way, witness natural wonders, battle treacherous weather, and experience the life of a tall ship sailor.
1 Views
18:43:15 03/17/11
Tall Ships: The Privateer Lynx - Trailer
[LESS INFO] 1 VIEWS | ADDED 18:43:15 03/17/11
Trailer for 51 minute HD documentary. VIDEO DOWNLOAD: $12.99 The tall ship Privateer Lynx is a powerful 122 foot Top Sail Schooner that looks like an apparition from the past. In reality, she is a modern sailing ship inspired by an earlier Lynx built in 1812 that served as a high tech war machine of her day. The ship"s story is that of a young America, fighting to free herself from English domination. With virtually no navy but plenty of Yankee ingenuity, American Privateers like the Lynx battled the British empire to a draw. Today"s Lynx is a floating educational platform bringing history, the wonders of sailing, and the state of the environment into sharp focus for both school children and adults. Sail with Lynx from Los Angles to San Francisco. Along the way, witness natural wonders, battle treacherous weather, and experience the life of a tall ship sailor.
0 Views
00:00:00 03/14/11
Summit Park Village in San Diego, CA - ForRent.com
[LESS INFO] 0 VIEWS | ADDED 00:00:00 03/14/11
At Summit Park Village, you'll be greeted by green and lush landscaping. The garden-style environment generates a feeling of warmth, while the gentle lapping of the pool evokes calm. To relax, float in our huge pool and then ease tension in our oversized spa. Our clubhouse has pool tables that turn over to be card tables! Summit Park Village features spacious bedrooms. Closet space won't be an issue either since all the bedrooms boast wall to wall closets, plus storage closets. When you feel like getting out, you'll have plenty of activities to choose! Qualcomm Stadium, home of the Padres and the Chargers, is a short drive away. Downtown San Diego and its glorious beaches are also close by. Stroll over to Lake Murray to explore the walking trails, fire up a BBQ, or bring your fishing pole and see if anything bites. Also nearby is the 5,000-acre Mission Trails Regional Park for you to spend a day walking along different paths. You've surely worked up an appetite by now after all your...
4 views | 0 comments
Click here to watch the video (01:49) Submitted By: Apartments For Rent Tags: Apartments For Rent In Rentals Moving Roommates ForRent.com San Dieogo CA Categories: Travel & Outdoors








