- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to develop a WPF application, but the samples are developed with WinForms which is dead for more than 10 years now.
Also the sample code is not written in a clean code style.
So maybe anybody is interesting in sharing clean code WPF samples.
I will not hesitate to share my RealSense WPF libraries.
Should I put them on GutHub or post them here in the forum?
Maybe we open different threads for each technology (WPF, Unity, ..)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Given the time constraints, I doubt something like this would work. Specially for multiple technologies.
I guess the best would be to show how to access to the actual raw data, so that everyone can then apply that to their own environments.
For example, to get the raw depth values as floats (pxcF32 is just a float), you can do something like this: (no error checkings for simplicity)
PXCSenseManager *pp = PXCSenseManager::CreateInstance(); unsigned int depthWidth = 640; unsigned int depthHeight = 480; unsigned int depthFPS = 60; pp->EnableStream(PXCCapture::STREAM_TYPE_DEPTH, depthWidth, depthHeight, depthFPS); pp->Init(); const PXCCapture::Sample *sample = pp->QuerySample(); PXCImage::ImageData * data = new PXCImage::ImageData; sample->depth->AcquireAccess(PXCImage::ACCESS_READ, PXCImage::PIXEL_FORMAT_DEPTH_F32, data); for(int y=0; y < depthHeight; y++) for(int x=0; x < depthWidth; x++) { pxcF32 depthvalue = ((pxcF32*)data->planes[0])[y * depthWidth + x]; } sample->depth->ReleaseAccess(data); delete data; pp->ReleaseFrame();
pp->Release();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If folk here do get together to share material, I recommend drafting some kind of formal document that gives permission for code to be freely used. This is because a rule of the contest is that you can only use material that you have permissions for if you didn't create it yourself. So you need to be able to back up any claim to freedom of use of that code in your project if someone from the contest asks.
A Creative Commons agreement would probably do the job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Marty,
I guess for small snippets of code a license would be irrelevant, but I do agree with you if the source code is substantial.
Using creative commons though, is definitely not the right choice here. Here is their FAQ response:
Can I apply a Creative Commons license to software?
We recommend against using Creative Commons licenses for software. Instead, we strongly encourage you to use one of the very good software licenses which are already available.
Instead, I would encourage people to use a permissive open source license, such as BSD, MIT, or zlib so that you can use the sample code and not necesarily open source your code. If someone distributes a sample code with a more restrictive open source license, like GPL for example, all source code that uses that sample must be distributed as open source as well.
For example, PCL and OpenCV are both distributed using BSD license. I would prefer that license for code samples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also the HP Sprout SDK uses WPF... Sprout is basically RealSense with most of its API access locked away
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why would you want to use WinForms (?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yosun wrote:
Also the HP Sprout SDK uses WPF... Sprout is basically RealSense with most of its API access locked away
Sounds cool.
But why is HP encapsulating the Intel Realsense API into a WPF sample, while Intel themselves offer C++ like C# samples for WinForms?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can someone point out the error in this code. All I am trying to do is print no of faces detected by the RealSense Camera.
here's the code. It only prints infinite 0s, even if there is a face in front of the Camera.
PXCMSenseManager sm = PXCMSenseManager.CreateInstance();
sm.EnableFace();
sm.Init();
while (sm.AcquireFrame()>= pxcmStatus.PXCM_STATUS_NO_ERROR )
{
PXCMFaceModule face2 = sm.QueryFace();
PXCMFaceData fdata= face2.CreateOutput();
Int32 no = fdata.QueryNumberOfDetectedFaces();
Console.WriteLine(no);
fdata.Dispose();
}
Thanks,
Shaleen

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page