pax_global_header 0000666 0000000 0000000 00000000064 11701035512 0014505 g ustar 00root root 0000000 0000000 52 comment=50b8b2d0cbd6654e552e0bd106f32869964caac4
Sensor-Stable-5.1.0.41/ 0000775 0000000 0000000 00000000000 11701035512 0014414 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/CHANGES 0000664 0000000 0000000 00000020235 11701035512 0015411 0 ustar 00root root 0000000 0000000 Detailed Change log:
--------------------
Version 5.1.0.41 (Stable version - Dec 28th 2011)
-------------------------------------------------
* No code changes, build is based on latest OpenNI.
Version 5.1.0.25 (Unstable version - Dec 18th 2011)
---------------------------------------------------
* Bug Fix: server-client didn't always work due to an uninitialized member.
* Installer bug fix: versions were compared by string instead of by number.
* Added Support for FW 5.5:
1) Support product ID 0601.
2) ISO and BULK interfaces are now switched.
3) AudioGenerator is no longer supported.
* Enumeration Bug Fix: From now on, a generator will not return on enumeration if one already exists from the same device.
* Android: makefiles now match ndk v7.
* Bug Fix: client-server did not pass timestamp correct in the NewDataAvailbale event, causing FrameSync to malfunction.
* Bug Fix: Enumeration for ImageGenerator could cause a crash.
* Default UsbInterface is now BULK on Arm (for performance reasons) and ISO on all other platforms.
* Default Image format is now uncompressed in ISO, and compressed in BULK.
* Server (Multiprocess) is not on by default on Arm.
* BC Bug fix: XnVInitStreamPropertiesInternal::IsProperty did not function correctly.
* BC Bug Fix: XnVDepthRepresentation would not set correct Y resolution.
* Added support for FW 5.6 (no audio)
* Added Android support to open source.
* Temporary patch for MacOSX: Cache the device path's since running enum on the MAC takes several seconds!
Version 5.0.5.1 (Unstable version - Nov 17th 2011)
--------------------------------------------------
* Removed support for very old 2.0 devices.
* Linux: XnSensorServer dependency was missing.
* Bug Fix: AllowMultiUsers property was not handled correctly.
Version 5.0.4.4 (Unstable version - Nov 7th 2011)
-------------------------------------------------
* Added YUV input in high res for FW 5.3.28 and above.
* Added grayscale 8 input format.
* Added automatic setting of input format, and automatic checking of modes.
* Updated to newer common makefiles
* Sensor client-server on windows: Allow starting server and client in different sessions (requires a special setting in GlobalDefaults.ini, as this causes things not to work properly if running on a machine with UAC on).
* Changed Engine changed to Sensor in the final installation files.
* Renamed Linux-x86 to "Linux" (supports x86, x64, Arm and MacOSX).
* Allow better cross compiling.
* Bug Fix: old XNS files would not set their IsGenerating property (and so it is left FALSE, even if node has frames).
* Updated the value of the UsbInterface property once endpoints are opened.
Version 5.0.4.3 (Stable version - Sep 18th 2011)
------------------------------------------------
* Some minor windows installer UI fix (title position).
* Fixed buffer overflow bugs in the software registration.
* Support for firmware 5.4.x: New TEC and extended serial number commands.
* On newer FWs (5.4+) high-res image output does not always have to be bayer so this rule will only be enforced on older versions.
* Preliminary Android Support.
* Preliminary ARM Support.
* Win32: Added the /MP (MultiProcess Compiling) flag to all projects to save build time.
* Bug Fix: Image Generator always said it supports JPEG (without checking the sensor itself).
* Fix a memory leak (about 180 bytes per generator).
Version 5.0.3.4 (Stable version - Jul 5th 2011)
-----------------------------------------------
* Windows Redist: Support for 64-bit systems.
* Control mutex is now per sensor and not global to all sensors.
Version 5.0.3.3 (Stable version - Jul 5th 2011)
-----------------------------------------------
* Linux: Allow installation to a different directory (for cross-compilation mainly).
* Workaround firmware bug: if no depth, IR timestamps are corrupt. Use host clock for timestamps instead.
* Bug Fix: unregistering USB event callback when destroying sensor to prevent crash when unplugging device.
* XnExportedSensorDevice now only enumerates devices that weren't created in the context yet.
Version 5.0.2.3 (Stable version - May 3rd 2011)
-----------------------------------------------
* Fixed use of deprecated CreateProductionTree().
* Bug Fix: playing XNS files in applications using deprecated API might cause memory leaks.
* Bug Fix: serial number was in hex format instead of decimal one.
* Make sure SensorV2 nodes will only use SensorV2 device (up to now they only checked it's a PrimeSense device).
Version 5.0.1.33 (Unstable version - Apr 18th 2011)
---------------------------------------------------
* CE4100: adding support in makefiles, redist and install.
* CE4100: default is now BULK with compressed formats.
Version 5.0.1.32 (Unstable version - Apr 11th 2011)
---------------------------------------------------
* Fixing log prints of resolutions (-1 appeared as MAX_UINT64...) to the resolution name.
* Linux Bug Fix: Server creates two log files, one in the client folder and one in /var/log/primesense/XnSensorServer
* Fixed a memory leak when rewinding old XNS files.
* Win32: WIX installer (replacing NSIS)
* Fixed wrong version in XnDeviceFile
Version 5.0.1.31 (Stable version - Apr 11th 2011)
-------------------------------------------------
* Fix BULK timeout - it was too small...
* Bug Fix: IR only works in QVGA...
* Added 64bit support for the installers.
* Fix wrong uses of the XN_IS_STATUS_OK macro (value is evaluated twice).
* Adding support for MJPEG pass-through.
* Adding initial support for new CMOS interfaces
* Adding initial JPEG support
* Fix for UAC installer problems.
* Fixed uninstall without OpenNI.
* Set minimum OpenNI version check in the installer.
* Fix seeking to first frame in old XNS files.
* Bug Fix: Client would fail to connect if trying to connect while server is shutting down.
* Improving the timestamps algorithm.
* performance improvement when enumerating for image nodes - a sensor should only be checked once.
* improving error message for setting grayscale8 in low resolutions.
* Improve thread-safety when starting server
* Bug Fix: a crash when trying to open a non-existing XNS file.
* Bug Fix: a potential crash if Init of depth generator fails.
* Sensor now supports the Device Identification capability.
* Server: fixing a deadlock problem between closing a stream and getting new data from it. This was done by splitting the sensor lock into two locks: one for changes on the sensor and one for changing the stream collection.
* MultiProcess Bug Fix: the lock on a sensor didn't exist, so nothing was synchronized.
* ImageGenerator now also changes InputFormat when changing resolution if needed (when switching from hi-res to normal & vice versa).
* Adding frame IDs to Audio (just counting)
* restoring defaults to QVGA.
* Add support for sensors with no image CMOS.
* Updated low-bandwidth USB devices buffer information.
* Added the Asus WAVI auto-detection for Win32.
* Low bandwidth devices now use bigger USB delays.
* New defaults are now VGA, uncompressed.
* Initial support for low-band devices:
1. Image, IR and audio does not enumerate.
2. Defaults changed to QVGA, compressed.
Version 5.0.0.25 (Unstable version - Jan 6th 2011)
--------------------------------------------------
* Bug fix: infinite loop in server when a client tries to disconnect and streams can't be closed (usb timeout for example).
* Added MacOSX platform support.
* Added the unstable README file.
* Removed useless win32 prerequisites...
* Fixing audio to work properly in the client-server model.
* Server Bug Fix: a potential dead lock was solved.
* Sensor Server now supports multiple sensors.
* Refactored server to a better design, which should decrease deadlocks and make code more readable.
* Adding support for enumerating and opening different sensors.
* Bug Fix: GetStringProperty would always return XN_STATUS_ERROR.
Version 5.0.0.24 (Stable version - Dec 8th 2010)
------------------------------------------------
* Initial release... Sensor-Stable-5.1.0.41/Data/ 0000775 0000000 0000000 00000000000 11701035512 0015265 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Data/GlobalDefaults.ini 0000664 0000000 0000000 00000012050 11701035512 0020654 0 ustar 00root root 0000000 0000000 [Core]
; 0 - Verbose, 1 - Info, 2 - Warning, 3 - Error (default)
LogLevel=3
; leave empty for nothing (default). ALL - all masks
LogMasks=ALL
; 0 - No (default), 1 - Yes
;LogWriteToConsole=1
; 0 - No (default), 1 - Yes
LogWriteToFile=1
; 0 - No (default), 1 - Yes
;LogWriteLineInfo=0
; leave empty for nothing (default). ALL - all masks
;DumpMasks=
; Number of milliseconds between profiling logs. 0 - Off (default)
;ProfilingInterval=1000
;---------------- Server Default Configuration -------------------
[Server]
; Use a server to access sensor. 0 - No (single application), 1 - Yes (multiple applications). Default: Arm - 0, other platforms - 1. Not supported on Mac.
;EnableMultiProcess=0
; When multi process is enabled, allows server and client running in different sessions. 0 - No (default), 1 - Yes
;EnableMultiUsers=0
; The timeout in which a server goes down if no client is connected, in milliseconds
;ServerNoClientsTimeout=10000
; The number of shared memory buffers per stream (default is 6).
; This value affects the number of concurrent clients to the server: (NumberOfBuffers = clients + 3)
;NumberOfBuffers=6
;---------------- Sensor Default Configuration -------------------
[Device]
; Mirroring. 0 - Off (default), 1 - On
;Mirror=1
; FrameSync. 0 - Off (default), 1 - On
;FrameSync=1
; Stream Data Timestamps. 0 - milliseconds, 1 - microseconds (default)
;HighResTimestamps=1
; A filter for the firmware log. Default is determined by firmware.
;FirmwareLogFilter=0
; Automatic firmare log retrieval. 0 - Off (default), or the number of milliseconds between log retrievals operations.
;FirmwareLogInterval=1000
; Print firmware log to console when automatic firmware log retrieval is on. 0 - Off (default), 1 - On
;FirmwareLogPrint=1
; Automatic firmware CPU statistics retrieval. 0 - Off (default), or the number of milliseconds between CPU retrievals operations.
;FirmwareCPUInterval=1000
; Is APC enabled. 0 - Off, 1 - On (default)
;APCEnabled=1
; USB interface to be used. 0 - FW Default, 1 - ISO endpoints, 2 - BULK endpoints. Default: Arm - 2, other platforms - 1
;UsbInterface=2
[Depth]
; Output format. 0 - Shift values, 1 - 12-bit depth values (default)
;OutputFormat=1
; Is stream mirrored. 0 - Off, 1 - On
;Mirror=1
; 0 - QVGA (default), 1 - VGA
;Resolution=1
; Frames per second (default is 30)
;FPS=30
; Min depth cutoff. 0-10000 mm (default is 0)
;MinDepthValue=0
; Max depth cutoff. 0-10000 mm (default is 10000)
;MaxDepthValue=10000
; Input format. 0 - Uncompressed 16-bit, 1 - PS Compression, 3 - Packed 11-bit (default)
;InputFormat=1
; Registration. 0 - Off (default), 1 - On
;Registration=1
; Registration Type. 0 - Don't care (default), 1 - use hardware accelaration, 2 - perform in software
;RegistrationType=0
; Hole Filler. 0 - Off, 1 - On (default)
;HoleFilter=1
; White Balance. 0 - Off, 1 - On (default)
;WhiteBalancedEnabled=1
; Gain. 0-50 (0 - Auto, 1 - Min., 50 - Max.). Default value is set by firmware.
;Gain=0
; GMC Mode. 0 - Off, 1 - On (default)
;GMCMode=0
; GMC Debug. 0 - Off (default), 1 - On
;GMCDebug=1
; Depth Auto Gain Region-of-Interest. Default values are set by firmware.
;DepthAGCBin0MinDepth=500
;DepthAGCBin0MaxDepth=800
;DepthAGCBin1MinDepth=1500
;DepthAGCBin1MaxDepth=1800
;DepthAGCBin2MinDepth=2500
;DepthAGCBin2MaxDepth=2800
;DepthAGCBin3MinDepth=3500
;DepthAGCBin3MaxDepth=3800
; Wavelength Correction Mechanism. 0 - Off (default), 1 - On
;WavelengthCorrection=1
; Wavelength Correction debug info. 0 - Off (default), 1 - On
;WavelengthCorrectionDebug=1
; Cropping section
[Depth.Cropping]
;OffsetX=0
;OffsetY=0
;SizeX=320
;SizeY=240
;Enabled=1
[Image]
; Output format. 2 - Gray8 (2.0 MP only), 4 - YUV422, 5 - RGB24 (default)
;OutputFormat=5
; Is stream mirrored. 0 - Off, 1 - On
;Mirror=1
; 0 - QVGA (default), 1 - VGA, 2- SXGA (1.3MP) 3 - UXGA (2.0MP)
;Resolution=1
; Frames per second (default is 30)
;FPS=30
; Input format. 0 - BAYER (1.3MP or 2.0MP only), 1 - Compressed YUV422 (default in BULK), 2 - Jpeg, 5 - Uncompressed YUV422 (default in ISO), 6 - Uncompressed 8-bit BAYER
;InputFormat=5
; Anti Flicker. 0 - Off (default), 50 - 50Hz, 60 - 60 Hz.
;Flicker=50
; Image quality when using Jpeg. 1-10 (1 - Lowest, 10 - Highest (default))
;Quality=10
; Cropping section
[Image.Cropping]
;OffsetX=0
;OffsetY=0
;SizeX=320
;SizeY=240
;Enabled=1
[IR]
; Output format. 3 - Grayscale 16-bit, 5 - RGB24 (default)
;OutputFormat=3
; Is stream mirrored. 0 - Off, 1 - On
;Mirror=1
; 0 - QVGA (default), 1 - VGA, 2 - SXGA(1.3MP)
;Resolution=1
; Frames per second (default is 30)
;FPS=30
; Cropping section
[SensorIR.Cropping]
;OffsetX=0
;OffsetY=0
;SizeX=320
;SizeY=240
;Enabled=1
[Audio]
; Sample Rate. 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 (default)
;SampleRate=48000
; Volume. 0-49 (0 - Mute, 1 - Min., 49 - Max.). Default is 12.
;LeftChannelVolume=12
;RightChannelVolume=12
; Number of channels. 1, 2 (default)
;NumOfChannels=2
Sensor-Stable-5.1.0.41/GPL.txt 0000664 0000000 0000000 00000105755 11701035512 0015614 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
Sensor-Stable-5.1.0.41/Include/ 0000775 0000000 0000000 00000000000 11701035512 0015777 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Include/XnCore.h 0000664 0000000 0000000 00000007601 11701035512 0017352 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_CORE_H_
#define _XN_CORE_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
#ifdef __cplusplus
#ifdef XN_CORE_EXPORTS
#define XN_CORE_API extern "C" XN_API_EXPORT
#define XN_CORE_CPP_API XN_API_EXPORT
#else
#define XN_CORE_API extern "C" XN_API_IMPORT
#define XN_CORE_CPP_API XN_API_IMPORT
#endif
#else
#ifdef XN_CORE_EXPORTS
#define XN_CORE_API XN_API_EXPORT
#else
#define XN_CORE_API XN_API_IMPORT
#endif
#endif
//---------------------------------------------------------------------------
// Exported Function Declaration
//---------------------------------------------------------------------------
/**
* This function initializes the core low-level SDK.
*/
XN_CORE_API XnStatus XnInit();
/**
* This function initializes the core low-level SDK from an INI file.
* Please refer to the low-level SDK overview/tutorial section for a complete list of INI entries.
* Note: This function is not very useful on its own. You should use the I/O subsystem initializing instead.
*
* @param cpINIFileName [in] A path to an INI file.
*/
XN_CORE_API XnStatus XnInitFromINIFile(const XnChar* cpINIFileName);
/**
* This function shuts down the core low-level SDK.
* Note: This function is not very useful on its own. You should use the I/O subsystem shutdown instead.
*/
XN_CORE_API XnStatus XnShutdown();
/**
* Returns the Xiron version as an integer calculated from this formula:
* (Xiron major version * 1000 + Xiron minor version)
*
* @return An integer representation of the Xiron version.
*/
XN_CORE_API XnUInt32 XnGetVersion(void);
/**
* Returns the Xiron version as a string in the following format:
* "Major.Minor-Platform (MMM DD YYYY HH:MM:SS)"
* For example: "1.0-Win32 (Sep 19 2006 11:22:33)"
*
* @return A string representation of the Xiron version.
*/
XN_CORE_API const XnChar* XnGetVersionString(void);
#endif //_XN_CORE_H_
Sensor-Stable-5.1.0.41/Include/XnDDK.h 0000664 0000000 0000000 00000006254 11701035512 0017067 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_DDK_H_
#define _XN_DDK_H_
#include
#include
#include
#include
#ifdef __cplusplus
#ifdef XN_DDK_EXPORTS
#define XN_DDK_API extern "C" XN_API_EXPORT
#define XN_DDK_CPP_API XN_API_EXPORT
#else
#define XN_DDK_API extern "C" XN_API_IMPORT
#define XN_DDK_CPP_API XN_API_IMPORT
#endif
#ifdef XN_DEVICE_EXPORTS
#define XN_DEVICE_API extern "C" XN_API_EXPORT
#else
#define XN_DEVICE_API extern "C" XN_API_IMPORT
#endif
#else
#ifdef XN_DDK_EXPORTS
#define XN_DDK_API XN_API_EXPORT
#else
#define XN_DDK_API XN_API_IMPORT
#endif
#ifdef XN_DEVICE_EXPORTS
#define XN_DEVICE_API XN_API_EXPORT
#else
#define XN_DEVICE_API XN_API_IMPORT
#endif
#endif
#define XN_MASK_DDK "DDK"
/**
* This function initializes the DDK library.
* This function must be called BEFORE calling any other method of a device.
*/
XN_DDK_API XnStatus XnDDKInit(const XnChar* strDevicesDir);
/**
* This function initializes the DDK library from an INI file.
*
* @param cpINIFileName [in] The name of the INI file.
*/
XN_DDK_API XnStatus XnDDKInitFromINIFile(const XnChar* cpINIFileName);
/**
* This function shuts down the DDK library.
*/
XN_DDK_API XnStatus XnDDKShutdown();
XN_DDK_API XnResolutions XnDDKGetResolutionFromXY(XnUInt32 nXRes, XnUInt32 nYRes);
XN_DDK_API XnBool XnDDKGetXYFromResolution(XnResolutions res, XnUInt32* pnXRes, XnUInt32* pnYRes);
XN_DDK_API const XnChar* XnDDKGetResolutionName(XnResolutions res);
#endif //_XN_DDK_H_
Sensor-Stable-5.1.0.41/Include/XnDDKStatus.h 0000664 0000000 0000000 00000032137 11701035512 0020272 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_DDK_STATUS_H_
#define _XN_DDK_STATUS_H_
#include
#include
XN_PS_STATUS_MESSAGE_MAP_START(XN_ERROR_GROUP_DDK)
XN_STATUS_MESSAGE(XN_STATUS_DDK_NOT_INIT, "Xiron DDK library was not initialized!")
XN_STATUS_MESSAGE(XN_STATUS_DDK_ALREADY_INIT, "Xiron DDK library was already initialized!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_DEPTH_RESOLUTION, "Invalid Xiron I/O stream depth resolution!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_IMAGE_RESOLUTION, "Invalid Xiron I/O stream image resolution!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_FPS, "Invalid Xiron I/O stream frame per second!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_ZP_DISTANCE, "Invalid Xiron I/O stream zero plane distance!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_ZP_PIXEL_SIZE, "Invalid Xiron I/O stream zero pixel size!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_AUDIO_SAMPLE_RATE, "Invalid Xiron I/O stream audio sample rate!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_AUDIO_NUMBER_OF_CHANNELS, "Invalid number of audio channels!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEPTH_BUFFER_TOO_SMALL, "The stream frame depth buffer is too small to contain the requested data!")
XN_STATUS_MESSAGE(XN_STATUS_IO_IMAGE_BUFFER_TOO_SMALL, "The stream frame image buffer is too small to contain the requested data!")
XN_STATUS_MESSAGE(XN_STATUS_IO_MISC_BUFFER_TOO_SMALL, "The stream frame misc buffer is too small to contain the requested data!")
XN_STATUS_MESSAGE(XN_STATUS_IO_AUDIO_BUFFER_TOO_SMALL, "The stream frame audio buffer is too small to contain the requested data!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_MODE, "Invalid Xiron I/O device mode!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_MODE_NOT_SUPPORTED, "The requested Xiron I/O device mode is not supported!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_FUNCTION, "Invalid Xiron I/O device function!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_FUNCTION_NOT_SUPPORTED, "This function is not supported by this Xiron I/O device.")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_AUDIO_READ_MODE, "Invalid Xiron I/O stream audio read mode!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_AUDIO_CHUNK_SIZE, "Invalid Xiron I/O stream audio read chunk size!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_WRONG_VERSION, "This device version is not supported!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_WRONG_SERIAL, "The device serial number is incorrect!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_CONNECTION_STRING, "The connection string is invalid!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_NOT_RESPONDING, "The device is not responding!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_BAD_PARAM_NAME, "The device parameter name is invalid!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_FRAME_HEADER, "Invalid Xiron I/O stream frame header!")
XN_STATUS_MESSAGE(XN_STATUS_IO_STREAM_NOT_SEQUENTIAL, "This stream is not sequential!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_SERVER_CONNECT_FAILED, "Failed to connect to the server!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_RESPONSE_MAGIC, "Got and invalid response magic from the device!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_RESPONSE_TYPE, "Got and invalid response type from the device!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_RESPONSE_SIZE, "Got and invalid response size from the device!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_RESPONSE_ORDER, "Got and invalid response order from the device!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_MAGIC, "Invalid Xiron I/O stream magic!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_OPEN_BY_ANOTHER_APPLICATION, "A device is already used by another application!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_BAD_PARAM, "Bad Parameter sent to the device!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_USB_DISCONNECTED, "USB is disconnected!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_USB_ERROR, "USB operation error!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_BAD_MAGIC, "Device Protocol: Bad Magic Received!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_WRONG_OPCODE, "Device Protocol: Unexpected opcode!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_UNSUPPORTED_OPCODE, "Device Protocol: Unsupported opcode!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_WRONG_ID, "Device Protocol: Unexpected ID!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_UNKNOWN_ERROR, "Device Protocol: Unknown Error!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_INVALID_COMMAND, "Device Protocol: Command Invalid!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_BAD_PACKET_CRC, "Device Protocol: CRC Error!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_BAD_PACKET_SIZE, "Device Protocol: Wrong packet size!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_BAD_PARAMS, "Device Protocol: Bad Parameter sent!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_BAD_COMMAND_SIZE, "Device Protocol: Bad command size!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROTOCOL_NOT_READY, "Device Protocol: Device is not ready!")
XN_STATUS_MESSAGE(XN_STATUS_WRONG_AUDIO_READ_MODE, "Device Protocol: Audio read mode is wrong!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_UNSUPPORTED_MODE, "Unsupported Mode!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_UNSUPPORTED_PARAMETER, "Unsupported Parameter!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_NOT_ENOUGH_INFORMATION, "Not enough information!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_INVALID_MAX_SHIFT, "Max shift value is too big!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_INVALID_MAX_DEPTH, "Max depth value is too big!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_FRAMES_NOT_SYNCHED, "Didn't get any synched frame!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROJECTOR_FAULT, "A projector fault is in progress!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_SAFE_MODE, "Device is in safe mode. Cannot start any stream!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_OVERHEAT, "The device has overheat!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROPERTY_ALREADY_EXISTS, "Property already exists!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROPERTY_DONT_EXIST, "No such property!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROPERTY_BAD_TYPE, "The property is of the wrong type!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROPERTY_READ_ONLY, "The property is read only and cannot be set!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROPERTY_WRITE_ONLY, "The property is write only and cannot be get!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROPERTY_OUT_OF_RANGE, "Value is out of range and cannot be set!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_PROPERTY_SIZE_DONT_MATCH, "General buffer passed to property has the wrong size!")
XN_STATUS_MESSAGE(XN_STATUS_STREAM_OUTPUT_BUFFER_TOO_SMALL, "The stream output buffer is too small to contain the requested data!")
XN_STATUS_MESSAGE(XN_STATUS_STREAM_OUTPUT_SET_ALREADY_IN_SET, "The set already contains an object of that stream!")
XN_STATUS_MESSAGE(XN_STATUS_MODULE_IS_NOT_STREAM, "This module is not a stream!")
XN_STATUS_MESSAGE(XN_STATUS_UNSUPPORTED_STREAM, "This stream is not supported by the device!")
XN_STATUS_MESSAGE(XN_STATUS_STREAM_ALREADY_EXISTS, "This stream already exists!")
XN_STATUS_MESSAGE(XN_STATUS_STREAM_NOT_OPEN, "This stream is not open!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_STREAM_IS_ON, "This change can only be made while stream is Off!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_FILE_CORRUPTED, "The file is corrupted!")
XN_STATUS_MESSAGE(XN_STATUS_IO_NO_DEVICES, "No Xiron I/O devices found!")
XN_STATUS_MESSAGE(XN_STATUS_IO_FAILED_FREE_DEVICES, "Failed to free all Xiron I/O devices!")
XN_STATUS_MESSAGE(XN_STATUS_IO_FAILED_CLOSE_DEVICES, "Failed to close all Xiron I/O devices!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_NOT_FOUND, "Xiron I/O device not found!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_NOT_LOADED, "Xiron I/O device is not loaded!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_NOT_OPENED, "Xiron I/O device is not opened!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_DESCRIPTION_FAILED, "Xiron I/O failed to get a valid device description!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_ALREADY_EXISTS, "Xiron I/O device already exists!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_ILLEGAL_NAME, "Xiron I/O device name is illegal!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_VERSION_MISMATCH, "Xiron I/O device version mismatch!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_STRING_TOO_LONG, "Xiron I/O device string is too long!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INIT_FAILED, "Device failed to initialize properly!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_READ_FAILED, "Device read error!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_SET_CLOCK_FAILED, "Failed to set the device clock speed!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_GET_CLOCK_FAILED, "Failed to get the device clock speed!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_SET_TIMEOUT_FAILED, "Failed to set the device timeout!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_WRITE_FAILED, "Device write error!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_WRONG_STATE, "The device is in the wrong operation state to perform this function!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_WRONG_MODE, "The device is in the wrong mode to perform this function!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_DRIVER_ERROR, "The device low-level driver returned an error!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_WRONG_HARDWARE, "The device is incompatible with this hardware!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_OPEN_FAILED, "Failed to open the device!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_HARDWARE_OPEN_FAILED, "Failed to open the device hardware!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_GET_TYPE_FAILED, "Failed to get the device hardware type!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_CLOSE_FAILED, "Failed to close the device!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_IOCONTROL_FAILED, "Device I/O control failed!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_IOOVERLAP_FAILED, "Device overlapped I/O failed!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_MISSING_INIT_FILE, "The device initialization file is missing!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_INIT_FILE, "The device initialization file is invalid!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_DEPTH_BUFFER, "Got and invalid depth buffer from the device!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_IMAGE_BUFFER, "Got and invalid image buffer from the device!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_MISC_BUFFER, "Got and invalid misc buffer from the device!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_FAILED_SANITY_CHECK, "The device failed the startup sanity check!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_MISSING_FIRMWARE, "The device firmware file is missing!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_CLEAR_FIRMWARE_FAILED, "Failed to clear the device firmware!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_UPDATE_FIRMWARE_FAILED, "Failed to update the device firmware!")
XN_STATUS_MESSAGE(XN_STATUS_IO_NO_FREE_HANDLE, "Xiron I/O couldn't find a free device handle!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_FLAG, "Invalid stream flag!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INIT_FAILED, "Xiron I/O init failed!")
XN_STATUS_MESSAGE(XN_STATUS_IO_SEEK_FAILED, "Xiron I/O seek failed!")
XN_STATUS_MESSAGE(XN_STATUS_IO_CALLBACK_FAILED, "The callback function failed!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_MODULE_NOT_FOUND, "The module (or stream) does not exist!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_MODULE_ALREADY_EXISTS, "The module (or stream) already exists!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DEVICE_INVALID_SHARING, "Invalid Xiron I/O device sharing mode!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_SERVER_DISCONNECTED, "The server has disconnected!")
XN_STATUS_MESSAGE(XN_STATUS_DEVICE_SERVER_ALREADY_RUNNING, "The server is already running!")
XN_PS_STATUS_MESSAGE_MAP_END(XN_ERROR_GROUP_DDK)
#endif //_XN_DDK_STATUS_H_
Sensor-Stable-5.1.0.41/Include/XnDevice.h 0000664 0000000 0000000 00000011676 11701035512 0017670 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_DEVICE_H_
#define _XN_DEVICE_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include
#include
#include
#include
#include
#include
#include
// General Defines
#define XN_DEVICE_READ_FRAME_TIMEOUT 2000
/** The basic definition of a Xiron device */
typedef struct XnDeviceDefinition
{
/** The device unique name. */
const XnChar* cpName;
/** A short description for the device. */
const XnChar* cpDescription;
/** The device major version. */
XnUInt8 nMajorVersion;
/** The device minor version. */
XnUInt8 nMinorVersion;
/** The compatible Xiron major version. */
XnUInt8 nXironVersion;
} XnDeviceDefinition;
/** The Xiron device mode enumerator type. */
typedef enum {
/** Read only mode. */
XN_DEVICE_MODE_READ = 0,
/** Write only mode. */
XN_DEVICE_MODE_WRITE
} XnDeviceMode;
/** The Xiron device sharing mode. */
typedef enum {
/* Device is exclusive for opening process. */
XN_DEVICE_EXCLUSIVE = 0,
/* Device is shared and can be opened by other processes. */
XN_DEVICE_SHARED = 1
} XnDeviceSharingMode;
typedef XnChar XnConnectionString[XN_DEVICE_MAX_STRING_LENGTH];
/** This structure defines the Xiron device configuration (when opening a new device). */
typedef struct XnDeviceConfig
{
/** The device I/O mode (read or write). */
XnDeviceMode DeviceMode;
/** The connection string (depending on the device this could mean: file name, IP, sensor serial, etc...). */
const XnChar* cpConnectionString;
/** Optional. A set of initial values to be used. */
const XnPropertySet* pInitialValues;
/** The device sharing mode. */
XnDeviceSharingMode SharingMode;
} XnDeviceConfig;
typedef void* XnDeviceHandle;
typedef enum XnStreamsChangeEventType
{
XN_DEVICE_STREAM_ADDED,
XN_DEVICE_STREAM_DELETED,
} XnStreamsChangeEventType;
typedef void (XN_CALLBACK_TYPE* XnDeviceOnStreamsChangedEventHandler)(XnDeviceHandle pDeviceHandle, const XnChar* StreamName, XnStreamsChangeEventType EventType, void* pCookie);
typedef void (XN_CALLBACK_TYPE* XnDeviceOnPropertyChangedEventHandler)(XnDeviceHandle pDeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, void* pCookie);
typedef void (XN_CALLBACK_TYPE* XnDeviceOnNewStreamDataEventHandler)(XnDeviceHandle pDeviceHandle, const XnChar* StreamName, void* pCookie);
//---------------------------------------------------------------------------
// Exported Functions Declaration. Every Device Must Implement Them All!
//---------------------------------------------------------------------------
// Function prototypes names
#define XN_DEVICE_PROTO_VAL(x,y) x ## y
#define XN_DEVICE_PROTO_APPEND(x,y) XN_DEVICE_PROTO_VAL(x,y)
#ifndef XN_DEVICE_EXPORT_PREFIX
#define XN_DEVICE_EXPORT_PREFIX XnDevice
#endif
#define XN_DEVICE_PROTO_NAME(name) XN_DEVICE_PROTO_APPEND(XN_DEVICE_EXPORT_PREFIX, name)
#define XN_DEVICE_INTERFACE_FUNCTION(name, sig) XN_DEVICE_API XnStatus XN_DEVICE_PROTO_NAME(name) sig;
#include "XnDeviceProto.inl"
#undef XN_DEVICE_INTERFACE_FUNCTION
#endif //_XN_DEVICE_H_ Sensor-Stable-5.1.0.41/Include/XnDeviceProto.inl 0000664 0000000 0000000 00000043335 11701035512 0021244 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
/**
* Gets the definition of a device.
*
* @param pDeviceDefinition [out] The returned device definition.
*/
XN_DEVICE_INTERFACE_FUNCTION(GetDefinition, (XnDeviceDefinition* pDeviceDefinition))
/**
* This function returns a list of possible connection strings for the specified device. (For example, the list of attached sensors' serial numbers', in the case of a sensor device).
*
* @param aConnectionStrings [in/out] An array to be filled with connection strings.
* @param pnCount [in/out] In: the size of the array. Out: the number of elements filled in the array.
*/
XN_DEVICE_INTERFACE_FUNCTION(Enumerate, (XnConnectionString* aConnectionStrings, XnUInt32* pnCount))
/**
* This function will create a device and return a handle to it.
*
* @param pDeviceHandle [out] The opened device handle. If the function fails, NULL is returned.
* @param pDeviceConfig [in] The requested device configuration mode. Contains the mode (read/write) and the target connection string.
*/
XN_DEVICE_INTERFACE_FUNCTION(Create, (XnDeviceHandle* pDeviceHandle, const XnDeviceConfig* pDeviceConfig))
/**
* Destroys a previously created device.
*
* @param pDeviceHandle [in/out] The requested device handle.
*/
XN_DEVICE_INTERFACE_FUNCTION(Destroy, (XnDeviceHandle* pDeviceHandle))
/**
* Returns the types of the streams supported by this device.
*
* @param DeviceHandle [in] The requested device handle.
* @param aStreamName [in/out] An array of stream names. Will be filled by the function.
* @param pnStreamNamesCount [in/out] The size of the array. Upon successful return, will contain the number of elements written to the array.
*/
XN_DEVICE_INTERFACE_FUNCTION(GetSupportedStreams,(const XnDeviceHandle DeviceHandle, const XnChar** aStreamName, XnUInt32* pnStreamNamesCount))
/**
* Creates a new stream in the device.
*
* @param DeviceHandle [in] The requested device handle.
* @param StreamType [in] The type of the stream to create (one of the types returned by XnDeviceEnumerateStreams).
* @param StreamName [in] A name for the new stream.
* @param pInitialValues [in] [Optional] A set of initial values for properties.
*/
XN_DEVICE_INTERFACE_FUNCTION(CreateStream,(const XnDeviceHandle DeviceHandle, const XnChar* StreamType, const XnChar* StreamName, const XnPropertySet* pInitialValues))
/**
* Destroys a previously created stream.
*
* @param DeviceHandle [in] The requested device handle.
* @param StreamName [in] The name of the stream to destroy.
*/
XN_DEVICE_INTERFACE_FUNCTION(DestroyStream,(const XnDeviceHandle DeviceHandle, const XnChar* StreamName))
/**
* Opens a stream for I/O operations.
*
* @param DeviceHandle [in] The requested device handle.
* @param StreamName [in] The name of the stream to open.
*/
XN_DEVICE_INTERFACE_FUNCTION(OpenStream,(const XnDeviceHandle DeviceHandle, const XnChar* StreamName))
/**
* Closes an open stream.
*
* @param DeviceHandle [in] The requested device handle.
* @param StreamName [in] The name of the stream to close.
*/
XN_DEVICE_INTERFACE_FUNCTION(CloseStream,(const XnDeviceHandle DeviceHandle, const XnChar* StreamName))
/**
* Opens all closed streams.
*
* @param DeviceHandle [in] The requested device handle.
*/
XN_DEVICE_INTERFACE_FUNCTION(OpenAllStreams,(const XnDeviceHandle DeviceHandle))
/**
* Closes all open streams.
*
* @param DeviceHandle [in] The requested device handle.
*/
XN_DEVICE_INTERFACE_FUNCTION(CloseAllStreams,(const XnDeviceHandle DeviceHandle))
/**
* Get a list of all the streams that exist in the device.
*
* @param DeviceHandle [in] The requested device handle.
* @param pstrStreamNames [in/out] An array of stream names. Will be filled by the function.
* @param pnArraySize [in/out] The size of the array. Upon successful return, will contain the number of elements written to the array.
*/
XN_DEVICE_INTERFACE_FUNCTION(GetStreamNames,(const XnDeviceHandle DeviceHandle, const XnChar** pstrStreamNames, XnUInt32* pnArraySize))
/**
* Checks if a specific module exists in this device.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] The name of the module to look for.
* @param pbDoesExist [out] TRUE if the module exists, FALSE otherwise.
*/
XN_DEVICE_INTERFACE_FUNCTION(DoesModuleExist,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, XnBool* pbDoesExist))
/**
* Registers to the event of streams change (stream created / destroyed)
*
* @param DeviceHandle [in] The requested device handle.
* @param Handler [in] A pointer to the function that will handle the event.
* @param pCookie [in] User cookie that will be passed as an argument to the event handler.
* @param phCallback [out] A handle for unregister.
*/
XN_DEVICE_INTERFACE_FUNCTION(RegisterToStreamsChange,(const XnDeviceHandle DeviceHandle, XnDeviceOnStreamsChangedEventHandler Handler, void* pCookie, XnCallbackHandle* phCallback))
/**
* Unregisters from the event of streams change (stream created / destroyed)
*
* @param DeviceHandle [in] The requested device handle.
* @param hCallback [in] The handle returned from RegisterToStreamsChange.
*/
XN_DEVICE_INTERFACE_FUNCTION(UnregisterFromStreamsChange,(const XnDeviceHandle DeviceHandle, XnCallbackHandle hCallback))
/**
* Creates a stream data object for the requested stream.
*
* @param DeviceHandle [in] The requested device handle.
* @param StreamName [in] The requested stream.
* @param ppStreamData [out] The created stream data object.
*/
XN_DEVICE_INTERFACE_FUNCTION(CreateStreamData,(const XnDeviceHandle DeviceHandle, const XnChar* StreamName, XnStreamData** ppStreamOutput))
/**
* Destroys a stream output object that was previously created using CreateStreamData.
*
* @param DeviceHandle [in] The requested device handle.
* @param ppStreamData [in] The stream output object to destroy.
*/
XN_DEVICE_INTERFACE_FUNCTION(DestroyStreamData,(XnStreamData** ppStreamData))
/**
* Registers to the event of new data from a stream.
*
* @param DeviceHandle [in] The requested device handle.
* @param Handler [in] A pointer to the function that will handle the event.
* @param pCookie [in] User cookie that will be passed as an argument to the event handler.
* @param phCallback [out] A handle for unregister.
*/
XN_DEVICE_INTERFACE_FUNCTION(RegisterToNewStreamData,(const XnDeviceHandle DeviceHandle, XnDeviceOnNewStreamDataEventHandler Handler, void* pCookie, XnCallbackHandle* phCallback))
/**
* Unregisters from the event of new data from a stream.
*
* @param DeviceHandle [in] The requested device handle.
* @param hCallback [in] The handle returned from RegisterToNewStreamData.
*/
XN_DEVICE_INTERFACE_FUNCTION(UnregisterFromNewStreamData,(const XnDeviceHandle DeviceHandle, XnCallbackHandle hCallback))
/**
* Checks if new data is available from stream.
*
* @param DeviceHandle [in] The requested device handle.
* @param StreamName [in] The name of the stream to check.
* @param pbNewDataAvailable [out] TRUE if new data is available, FALSE otherwise.
*/
XN_DEVICE_INTERFACE_FUNCTION(IsNewDataAvailable,(const XnDeviceHandle DeviceHandle, const XnChar* StreamName, XnBool* pbNewDataAvailable, XnUInt64* pnTimestamp))
/**
* Waits for new data to be available from requested stream, and then return it.
*
* @param DeviceHandle [in] The requested device handle.
* @param pStreamOutput [in/out] A stream output object. The function will use the stream output object to determine which stream to read.
*/
XN_DEVICE_INTERFACE_FUNCTION(ReadStream,(const XnDeviceHandle DeviceHandle, XnStreamData* pStreamOutput))
/**
* Waits for new data from the primary stream to be available, and then reads all requested streams.
*
* @param DeviceHandle [in] The requested device handle.
* @param pStreamOutputSet [in/out] A set of stream output objects.
*/
XN_DEVICE_INTERFACE_FUNCTION(Read,(const XnDeviceHandle DeviceHandle, XnStreamDataSet* pStreamOutputSet))
/**
* Writes a single stream data to the device.
*
* @param DeviceHandle [in] The requested device handle.
* @param pStreamOutput [in] A stream output object.
*/
XN_DEVICE_INTERFACE_FUNCTION(WriteStream,(const XnDeviceHandle DeviceHandle, XnStreamData* pStreamOutput))
/**
* Writes multiple streams to the device.
*
* @param DeviceHandle [in] The requested device handle.
* @param pStreamOutputSet [in] A set of stream output objects.
*/
XN_DEVICE_INTERFACE_FUNCTION(Write,(const XnDeviceHandle DeviceHandle, XnStreamDataSet* pStreamOutputSet))
/**
* Gets current position of the device.
*
* @param DeviceHandle [in] The requested device handle.
* @param pnTimestamp [out] Current device timestamp.
*/
XN_DEVICE_INTERFACE_FUNCTION(Tell,(const XnDeviceHandle DeviceHandle, XnUInt64* pnTimestamp))
/**
* Seeks the device to the requested position.
*
* @param DeviceHandle [in] The requested device handle.
* @param nTimestamp [in] Requested device timestamp.
*/
XN_DEVICE_INTERFACE_FUNCTION(Seek,(const XnDeviceHandle DeviceHandle, XnUInt64 nTimestamp))
/**
* Gets current frame position of the device.
*
* @param DeviceHandle [in] The requested device handle.
* @param pnFrameID [out] Current device frame.
*/
XN_DEVICE_INTERFACE_FUNCTION(TellFrame,(const XnDeviceHandle DeviceHandle, XnUInt32* pnFrameID))
/**
* Seeks the device to the requested frame position.
*
* @param DeviceHandle [in] The requested device handle.
* @param nFrameID [in] Requested device frame.
*/
XN_DEVICE_INTERFACE_FUNCTION(SeekFrame,(const XnDeviceHandle DeviceHandle, XnUInt32 nFrameID))
/**
* Checks if a specific property exists in a module.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param pbDoesExist [out] TRUE if the property exists, FALSE otherwise.
*/
XN_DEVICE_INTERFACE_FUNCTION(DoesPropertyExist,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, XnBool* pbDoesExist))
/**
* Returns the type of a specific property.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param pnType [out] Type of this property.
*/
XN_DEVICE_INTERFACE_FUNCTION(GetPropertyType,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, XnPropertyType* pnType))
/**
* Sets the value of an int property.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param nValue [in] New requested value.
*/
XN_DEVICE_INTERFACE_FUNCTION(SetIntProperty,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, XnUInt64 nValue))
/**
* Sets the value of a real property.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param dValue [in] New requested value.
*/
XN_DEVICE_INTERFACE_FUNCTION(SetRealProperty,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, XnDouble dValue))
/**
* Sets the value of a string property.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param csValue [in] New requested value.
*/
XN_DEVICE_INTERFACE_FUNCTION(SetStringProperty,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, const XnChar* csValue))
/**
* Sets the value of a general property.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param Value [in] New requested value.
*/
XN_DEVICE_INTERFACE_FUNCTION(SetGeneralProperty,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, XnGeneralBuffer Value))
/**
* Gets the value of an int property.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param pnValue [out] Current value.
*/
XN_DEVICE_INTERFACE_FUNCTION(GetIntProperty,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, XnUInt64* pnValue))
/**
* Gets the value of a real property.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param pdValue [out] Current value.
*/
XN_DEVICE_INTERFACE_FUNCTION(GetRealProperty,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, XnDouble* pdValue))
/**
* Gets the value of a string property.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param csValue [in/out] Current value. The passed buffer should be of size XN_DEVICE_MAX_STRING_LENGTH.
*/
XN_DEVICE_INTERFACE_FUNCTION(GetStringProperty,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, XnChar* csValue))
/**
* Gets the value of a general property.
*
* @param DeviceHandle [in] The requested device handle.
* @param ModuleName [in] Name of the module.
* @param PropertyName [in] Name of the property to change.
* @param pValue [out] A buffer to fill.
*/
XN_DEVICE_INTERFACE_FUNCTION(GetGeneralProperty,(const XnDeviceHandle DeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, const XnGeneralBuffer* pValue))
/**
* Loads configuration from INI file.
*
* @param DeviceHandle [in] The requested device handle.
* @param csINIFilePath [in] A path to the INI file.
* @param csSectionName [in] The name of the section containing configuration.
*/
XN_DEVICE_INTERFACE_FUNCTION(LoadConfigFromFile,(const XnDeviceHandle DeviceHandle, const XnChar* csINIFilePath, const XnChar* csSectionName))
/**
* Batch-Configures device. All the properties in the set will be set as a single transaction.
*
* @param DeviceHandle [in] The requested device handle.
* @param pChangeSet [in] A set of properties to be changed.
*/
XN_DEVICE_INTERFACE_FUNCTION(BatchConfig,(const XnDeviceHandle DeviceHandle, const XnPropertySet* pChangeSet))
/**
* Gets all the properties of a device.
*
* @param DeviceHandle [in] The requested device handle.
* @param pPropertySet [in] A property set to be filled with all the properties.
* @param bNoStreams [in] When TRUE, only modules will be returned.
* @param strModule [in] If provided, only this module's properties will be returned.
*/
XN_DEVICE_INTERFACE_FUNCTION(GetAllProperties,(const XnDeviceHandle DeviceHandle, XnPropertySet* pPropertySet, XnBool bNoStreams, const XnChar* strModule))
/**
* Registers an event handler to the Property Changed event of a specific property.
*
* @param DeviceHandle [in] The requested device handle.
* @param Module [in] Name of the module.
* @param PropertyName [in] Name of the property to register to.
* @param Handler [in] A pointer to the function that will handle the event.
* @param pCookie [in] User cookie that will be passed as an argument to the event handler.
* @param phCallback [out] A handle for unregister.
*/
XN_DEVICE_INTERFACE_FUNCTION(RegisterToPropertyChange,(const XnDeviceHandle DeviceHandle, const XnChar* Module, const XnChar* PropertyName, XnDeviceOnPropertyChangedEventHandler Handler, void* pCookie, XnCallbackHandle* phCallback))
/**
* Unregisters an event handler from the Property Changed event.
*
* @param DeviceHandle [in] The requested device handle.
* @param Module [in] Name of the module.
* @param PropertyName [in] Name of the property to register to.
* @param hCallback [in] The handle returned from RegisterToNewStreamData.
*/
XN_DEVICE_INTERFACE_FUNCTION(UnregisterFromPropertyChange,(const XnDeviceHandle DeviceHandle, const XnChar* Module, const XnChar* PropertyName, XnCallbackHandle hCallback))
Sensor-Stable-5.1.0.41/Include/XnDeviceProxy.h 0000664 0000000 0000000 00000012364 11701035512 0020725 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_DEVICE_PROXY_H__
#define __XN_DEVICE_PROXY_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
//---------------------------------------------------------------------------
// Exported Functions
//---------------------------------------------------------------------------
/*****************************/
/* XnDevice interface */
/*****************************/
#define XN_DEVICE_PROXY_PROTO_APPEND(prefix, name) prefix ## name
#define XN_DEVICE_PROXY_PROTO(name) XN_DEVICE_PROXY_PROTO_APPEND(XnDeviceProxy, name)
#define XN_DEVICE_INTERFACE_FUNCTION(name, sig) XN_DDK_API XnStatus XN_DEVICE_PROXY_PROTO(name)sig;
#include
#undef XN_DEVICE_INTERFACE_FUNCTION
/****************************/
/* Specific Proxy Functions */
/****************************/
/**
* Gets a list of supported devices, meaning, devices loaded by device manager.
*
* @param aDeviceDefinitions [in] An array of XnDeviceDefinition to be filled with information.
* @param pnCount [in/out] In: the size of the array. Out: the number of elements filled in the array.
*/
XN_DDK_API XnStatus XnDeviceProxyGetDeviceList(XnDeviceDefinition* aDeviceDefinitions, XnUInt32* pnCount);
/**
* Enumerates a specific device, by device name.
*
* @param csDeviceName [in] The name of the device to enumerate.
* @param aConnectionStrings [in] An array to be filled with connection strings.
* @param pnCount [in/out] In: the size of the array. Out: the number of elements filled in the array.
*/
XN_DDK_API XnStatus XnDeviceProxyEnumerateDeviceByName(const XnChar* csDeviceName, XnConnectionString* aConnectionStrings, XnUInt32* pnCount);
/**
* Creates a device by name.
*
* @param csDeviceName [in] The name of the device to create. The special value "Auto" will create any available device.
* @param pDeviceHandle [out] The opened device handle. If the function fails, NULL is returned.
* @param pDeviceConfig [in] The requested device configuration mode. Contains the mode (read/write) and the target connection string.
*/
XN_DDK_API XnStatus XnDeviceProxyCreateDeviceByName(const XnChar* csDeviceName, XnDeviceHandle* pDeviceHandle, const XnDeviceConfig* pDeviceConfig);
/**
* Creates a device by definitions in INI file.
*
* @param strIniFileName [in] INI file to use for initialization.
* @param strSectionName [in] section name in INI file that describes the device.
* @param pDeviceHandle [out] The opened device handle. If the function fails, NULL is returned.
* @param pInitialValues [in] Optional. A set of initial values to be used.
*/
XN_DDK_API XnStatus XnDeviceProxyCreateDeviceByINIFile(const XnChar* strIniFileName, const XnChar* strSectionName, XnDeviceHandle* pDeviceHandle, const XnPropertySet* pInitialValues);
/**
* Destroys a stream output object that was previously created using CreateStreamOutput.
*
* @param csDeviceName [in] The name of the device that created this object.
* @param ppStreamOutput [in] The stream output object to destroy.
*/
XN_DDK_API XnStatus XnDeviceProxyDestroyStreamOutputByName(const XnChar* csDeviceName, XnStreamData** ppStreamOutput);
/**
* Gets the name of an opened device.
*
* @param DeviceHandle [in] The requested device handle.
* @param csDeviceName [in/out] A string to be filled with its name. The buffer must be at least XN_DEVICE_MAX_STRING_LENGTH long.
*/
XN_DDK_API XnStatus XnDeviceProxyGetDeviceName(XnDeviceHandle DeviceHandle, XnChar* csDeviceName);
#endif //__XN_DEVICE_PROXY_H__ Sensor-Stable-5.1.0.41/Include/XnEE.h 0000664 0000000 0000000 00000003705 11701035512 0016754 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_EE_COMMON_H_
#define _XN_EE_COMMON_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
// Common
#include
#include
#endif //_XN_EE_COMMON_H_
Sensor-Stable-5.1.0.41/Include/XnEE/ 0000775 0000000 0000000 00000000000 11701035512 0016576 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Include/XnEE/XnEEAlgorithms.h 0000664 0000000 0000000 00000004315 11701035512 0021603 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_EE_ALGORITHMS_H_
#define _XN_EE_ALGORITHMS_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include
#include
#include
#include
#include
#include
#include
#endif //_XN_EE_ALGORITHMS_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnEECore.h 0000664 0000000 0000000 00000004166 11701035512 0020366 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_EE_CORE_H_
#define _XN_EE_CORE_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
// Data Types
#include
#include
#include
#include
// Device
#include
// Algorithms
#include
// Utilities
#include
#endif //_XN_EE_CORE_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnEEFramework.h 0000664 0000000 0000000 00000004053 11701035512 0021426 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_EE_FW_H_
#define _XN_EE_FW_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
// Algorithms
#include
// Virtual Objects
#include
// Math
#include
// Geometry
#include
#endif //_XN_EE_FW_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnEEGeometry.h 0000664 0000000 0000000 00000003674 11701035512 0021274 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_EE_GEOMETRY_H_
#define _XN_EE_GEOMETRY_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#endif //_XN_EE_GEOMETRY_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnEEMath.h 0000664 0000000 0000000 00000003664 11701035512 0020371 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_EE_MATH_H_
#define _XN_EE_MATH_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#endif //_XN_EE_MATH_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnEEObjects.h 0000664 0000000 0000000 00000004012 11701035512 0021055 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_EE_OBJECTS_H_
#define _XN_EE_OBJECTS_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include
#include
#endif //_XN_EE_OBJECTS_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnV3DBox.h 0000664 0000000 0000000 00000007646 11701035512 0020337 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_3DBOX_H_
#define _XNV_3DBOX_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnV3DGeometry.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a specific XnVVirtualObject class, which represents a Real World Axis Aligned 3D box.
*/
class XN_EE_FW_API XnV3DBox : public XnV3DGeometry
{
public:
XnV3DBox();
XnV3DBox(const XnVPoint& ptTopLeftNear, const XnVPoint& ptBottomRightFar);
/**
* The Real World coordinated of the box.
*
* @param [in] ptTopLeftNear Minimum coordinates
* @param [in] ptBottomRightFar Maximum coordinates
*/
void SetPoints(const XnVPoint& ptTopLeftNear, const XnVPoint& ptBottomRightFar);
/**
* Intersect the box with a depth map, resulting in the intersection depth map.
*
* @param [in] dmOther The depth map to check against
* @param [out] dmOutput The result of the intersection
*/
XnUInt32 Intersect(const XnVDepthMap& dmOther, XnVDepthMap& dmOutput);
/**
* Check if there is an intersection between the box and the depth map,
* With a minimum size.
*
* @param [in] dmOther The depth map to check against
* @param [in] nThreshold The minimum number of points in order to conclude an intersection
*
* @return true if the intersection had at least the minimum number of point.
*/
XnBool IsIntersect(const XnVDepthMap& dmOther, XnUInt32 nThreshold);
XnBool IsIntersect(const XnV3DVector& pt) const;
/**
* Get the intersection size
*
* @param [in] dmOther The depth map to check against.
*
* @return Number of points in the intersection.
*/
XnUInt32 IntersectionSize(const XnVDepthMap& dmOther);
inline XnBool IsValid()
{
return m_bValid;
}
const XnVPoint& GetBoundingMins() const {return m_RWBoundingBox.GetMins();}
const XnVPoint& GetBoundingMaxs() const {return m_RWBoundingBox.GetMaxs();}
protected:
XnVBoundingBox m_RWBoundingBox; // RW Box
protected:
XnBool m_bValid;
protected:
XnUInt32 Intersection(const XnVDepthMap& dmOther, XnUInt32 nThreshold, XnVDepthMap* pdmOutput);
};
#endif //_XNV_3DBOX_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnV3DGeometry.h 0000664 0000000 0000000 00000004421 11701035512 0021366 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_3DGEOMETRY_H_
#define _XNV_3DGEOMETRY_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVVirtualObject.h"
#include "XnV3DVector.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_EE_FW_API XnV3DGeometry : public XnVVirtualObject
{
public:
virtual ~XnV3DGeometry() {}
virtual XnBool IsIntersect(const XnV3DVector& pt) const = 0;
};
#endif //_XNV_3DGEOMETRY_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnV3DVector.h 0000664 0000000 0000000 00000034645 11701035512 0021050 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_3DVECTOR_H_
#define _XNV_3DVECTOR_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include "XnVMathCommon.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_EE_FW_API XnV3DVector : public XnVPoint
{
public:
// Constructors
inline XnV3DVector();
inline XnV3DVector(XnFloat fX, XnFloat fY, XnFloat fZ);
inline XnV3DVector(const XnVPoint& ptOther);
inline XnV3DVector(const XnV3DVector& v3Other);
inline XnV3DVector(XnFloat f);
inline XnV3DVector(XnFloat* pf);
// Assignment
inline XnV3DVector& operator=(const XnV3DVector& v3Rhs);
inline XnV3DVector& operator=(const XnVPoint& ptRhs);
// Access
inline XnFloat operator[](XnUInt32 index) const;
inline XnFloat& operator[](XnUInt32 index);
// Set
inline XnV3DVector& Set(const XnV3DVector& v3Other);
inline XnV3DVector& Set(const XnVPoint& ptOther);
inline XnV3DVector& Set(XnFloat fX, XnFloat fY, XnFloat fZ);
inline XnV3DVector& Set(XnFloat f);
// Zero
inline XnV3DVector& SetZero();
inline XnBool IsZero() const;
// Comparison
inline XnBool operator==(const XnV3DVector& v3Rhs) const;
inline XnBool operator!=(const XnV3DVector& v3Rhs) const;
// Negation
inline XnV3DVector operator-() const;
inline XnV3DVector& Negate(const XnV3DVector& v3Other);
inline XnV3DVector& Negate();
// Multiplication
inline XnV3DVector operator*(const XnV3DVector& v3Rhs) const;
inline XnV3DVector& operator*=(const XnV3DVector& v3Rhs);
inline XnV3DVector& Multiply(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs);
friend inline XnV3DVector operator*(XnFloat f, const XnV3DVector& v3Rhs);
inline XnV3DVector& Multiply(XnFloat f, const XnV3DVector& v3Rhs);
inline XnV3DVector operator*(XnFloat f) const;
inline XnV3DVector& operator*=(XnFloat f);
inline XnV3DVector& Multiply(const XnV3DVector& v3Lhs, XnFloat f);
// Division
inline XnV3DVector operator/(XnFloat f) const;
inline XnV3DVector& operator/=(XnFloat f);
inline XnV3DVector& Divide(const XnV3DVector& v3Lhs, XnFloat f);
// Addition
inline XnV3DVector operator+(const XnV3DVector& v3Rhs) const;
inline XnV3DVector& operator+=(const XnV3DVector& v3Rhs);
inline XnV3DVector& Add(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs);
inline XnV3DVector operator+(XnFloat f) const;
inline XnV3DVector& operator+=(XnFloat f);
inline XnV3DVector& Add(const XnV3DVector& v3Lhs, XnFloat f);
// Subtraction
inline XnV3DVector operator-(const XnV3DVector& v3Rhs) const;
inline XnV3DVector& operator-=(const XnV3DVector& v3Rhs);
inline XnV3DVector& Subtract(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs);
inline XnV3DVector operator-(XnFloat f) const;
inline XnV3DVector& operator-=(XnFloat f);
inline XnV3DVector& Subtract(const XnV3DVector& v3Lhs, XnFloat f);
inline XnV3DVector& Sqrt();
inline XnV3DVector& Sqrt(const XnV3DVector& v3Other);
// Magnitude
inline XnFloat Magnitude() const;
inline XnFloat MagnitudeSquared() const;
// Distance
inline XnFloat Distance(const XnV3DVector& v3Other) const;
inline XnFloat DistanceSquared(const XnV3DVector& v3Other) const;
// Normalize
inline XnFloat Normalize();
// Orthogonal
inline XnV3DVector& OrthogonalVector(const XnV3DVector& v3Other);
inline XnV3DVector& UnitOrthogonalVector(const XnV3DVector& v3Other);
// Cross product
inline XnV3DVector operator^(const XnV3DVector& v3Rhs) const;
inline XnV3DVector& CrossProduct(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs);
// Dot Product
inline XnFloat operator|(const XnV3DVector& v3Rhs) const;
friend inline XnFloat DotProduct(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs);
// Interpolation
inline XnV3DVector& Interpolate(const XnV3DVector& v3Vec1, const XnV3DVector& v3Vec2, XnFloat fAlpha);
inline XnBool IsSameDirection(const XnV3DVector& v3Other) const;
inline XnFloat GetTolerance() const;
inline void SetTolerance(XnFloat fTolerance);
protected:
XnFloat m_fTolerance;
};
XnFloat XnV3DVector::GetTolerance() const
{
return m_fTolerance;
}
void XnV3DVector::SetTolerance(XnFloat fTolerance)
{
m_fTolerance = fTolerance;
}
XnV3DVector::XnV3DVector() :
m_fTolerance(1e-5f)
{
Set(0);
}
XnV3DVector::XnV3DVector(XnFloat fX, XnFloat fY, XnFloat fZ) :
m_fTolerance(1e-5f)
{
Set(fX, fY, fZ);
}
XnV3DVector::XnV3DVector(const XnV3DVector& v3Other)
{
Set(v3Other);
}
XnV3DVector::XnV3DVector(const XnVPoint& ptOther)
{
Set(ptOther);
}
XnV3DVector::XnV3DVector(XnFloat f) :
m_fTolerance(1e-5f)
{
Set(f);
}
XnV3DVector::XnV3DVector(XnFloat* pf) :
m_fTolerance(1e-5f)
{
Set(pf[0], pf[1], pf[2]);
}
// Assignment
XnV3DVector& XnV3DVector::operator=(const XnV3DVector& v3Rhs)
{
m_fTolerance = v3Rhs.m_fTolerance;
return Set(v3Rhs.X(), v3Rhs.Y(), v3Rhs.Z());
}
XnV3DVector& XnV3DVector::operator=(const XnVPoint& ptRhs)
{
m_fTolerance = 1e-5f;
return Set(ptRhs.X(), ptRhs.Y(), ptRhs.Z());
}
// Access
XnFloat XnV3DVector::operator[](XnUInt32 nIndex) const
{
if (nIndex > 2)
return elements[3];
return elements[nIndex];
}
XnFloat& XnV3DVector::operator[](XnUInt32 nIndex)
{
if (nIndex > 2)
return elements[3];
return elements[nIndex];
}
// Set
XnV3DVector& XnV3DVector::Set(const XnV3DVector& v3Other)
{
return *this = v3Other;
}
XnV3DVector& XnV3DVector::Set(const XnVPoint& ptOther)
{
return *this = ptOther;
// return Set(ptOther.X(), ptOther.Y(), ptOther.Z())
}
XnV3DVector& XnV3DVector::Set(XnFloat x, XnFloat y, XnFloat z)
{
SetPoint(x, y, z);
return *this;
}
XnV3DVector& XnV3DVector::Set(XnFloat f)
{
return Set(f, f, f);
}
// Zero
XnV3DVector& XnV3DVector::SetZero()
{
return Set(0);
}
XnBool XnV3DVector::IsZero() const
{
return (fabs(X()) < m_fTolerance &&
fabs(Y()) < m_fTolerance &&
fabs(Z()) < m_fTolerance);
}
// Comparison
XnBool XnV3DVector::operator==(const XnV3DVector& v3Rhs) const
{
return (fabs(X() - v3Rhs.X()) < m_fTolerance &&
fabs(Y() - v3Rhs.Y()) < m_fTolerance &&
fabs(Z() - v3Rhs.Z()) < m_fTolerance);
}
XnBool XnV3DVector::operator!=(const XnV3DVector& v3Rhs) const
{
return !this->operator==(v3Rhs);
}
// Negation
XnV3DVector XnV3DVector::operator-() const
{
return XnV3DVector(-X(), -Y(), -Z());
}
XnV3DVector& XnV3DVector::Negate(const XnV3DVector& v3Other)
{
return Set(-v3Other.X(), -v3Other.Y(), -v3Other.Z());
}
XnV3DVector& XnV3DVector::Negate()
{
return Set(-X(), -Y(), -Z());
}
// Multiplication
XnV3DVector XnV3DVector::operator*(const XnV3DVector& v3Rhs) const
{
return XnV3DVector(X() * v3Rhs.X(), Y() * v3Rhs.Y(), Z()*v3Rhs.Z());
}
XnV3DVector& XnV3DVector::operator*=(const XnV3DVector& v3Rhs)
{
return Set(X() * v3Rhs.X(), Y() * v3Rhs.Y(), Z() * v3Rhs.Z());
}
XnV3DVector& XnV3DVector::Multiply(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs)
{
return Set(v3Lhs.X() * v3Rhs.X(), v3Lhs.Y() * v3Rhs.Y(), v3Lhs.Z() * v3Rhs.Z());
}
XnV3DVector operator*(XnFloat f, const XnV3DVector& v3Rhs)
{
return XnV3DVector(f * v3Rhs.X(), f * v3Rhs.Y(), f * v3Rhs.Z());
}
XnV3DVector& XnV3DVector::Multiply(XnFloat f, const XnV3DVector& v3Rhs)
{
return Set(f * v3Rhs.X(), f * v3Rhs.Y(), f * v3Rhs.Z());
}
XnV3DVector XnV3DVector::operator*(XnFloat f) const
{
return XnV3DVector(X() * f, Y() * f, Z() * f);
}
XnV3DVector& XnV3DVector::operator*=(XnFloat f)
{
return Set(X() * f, Y() * f, Z() * f);
}
XnV3DVector& XnV3DVector::Multiply(const XnV3DVector& v3Lhs, XnFloat f)
{
return Set(v3Lhs.X() * f, v3Lhs.Y() * f, v3Lhs.Z() * f);
}
// Division
XnV3DVector XnV3DVector::operator/(XnFloat f) const
{
return XnV3DVector(X() / f, Y() / f, Z() / f);
}
XnV3DVector& XnV3DVector::operator/=(XnFloat f)
{
return Set(X() / f, Y() / f, Z() / f);
}
XnV3DVector& XnV3DVector::Divide(const XnV3DVector& v3Lhs, XnFloat f)
{
return Set(v3Lhs.X() / f, v3Lhs.Y() / f, v3Lhs.Z() / f);
}
// Addition
XnV3DVector XnV3DVector::operator+(const XnV3DVector& v3Rhs) const
{
return XnV3DVector(X() + v3Rhs.X(), Y() + v3Rhs.Y(), Z() + v3Rhs.Z());
}
XnV3DVector& XnV3DVector::operator+=(const XnV3DVector& v3Rhs)
{
return Set(X() + v3Rhs.X(), Y() + v3Rhs.Y(), Z() + v3Rhs.Z());
}
XnV3DVector& XnV3DVector::Add(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs)
{
return Set(v3Lhs.X() + v3Rhs.X(), v3Lhs.Y() + v3Rhs.Y(), v3Lhs.Z() + v3Rhs.Z());
}
XnV3DVector XnV3DVector::operator+(XnFloat f) const
{
return XnV3DVector(X() + f, Y() + f, Z() + f);
}
XnV3DVector& XnV3DVector::operator+=(XnFloat f)
{
return Set(X() + f, Y() + f, Z() + f);
}
XnV3DVector& XnV3DVector::Add(const XnV3DVector& v3Lhs, XnFloat f)
{
return Set(v3Lhs.X() + f, v3Lhs.Y() + f, v3Lhs.Z() + f);
}
// Subtraction
XnV3DVector XnV3DVector::operator-(const XnV3DVector& v3Rhs) const
{
return XnV3DVector(X() - v3Rhs.X(), Y() - v3Rhs.Y(), Z() - v3Rhs.Z());
}
XnV3DVector& XnV3DVector::operator-=(const XnV3DVector& v3Rhs)
{
return Set(X() - v3Rhs.X(), Y() - v3Rhs.Y(), Z() - v3Rhs.Z());
}
XnV3DVector& XnV3DVector::Subtract(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs)
{
return Set(v3Lhs.X() - v3Rhs.X(), v3Lhs.Y() - v3Rhs.Y(), v3Lhs.Z() - v3Rhs.Z());
}
XnV3DVector XnV3DVector::operator-(XnFloat f) const
{
return XnV3DVector(X() - f, Y() - f, Z() - f);
}
XnV3DVector& XnV3DVector::operator-=(XnFloat f)
{
return Set(X() - f, Y() - f, Z() - f);
}
XnV3DVector& XnV3DVector::Subtract(const XnV3DVector& v3Lhs, XnFloat f)
{
return Set(v3Lhs.X() - f, v3Lhs.Y() - f, v3Lhs.Z() - f);
}
XnV3DVector& XnV3DVector::Sqrt()
{
return Set(sqrt(X()), sqrt(Y()), sqrt(Z()));
}
XnV3DVector& XnV3DVector::Sqrt(const XnV3DVector& v3Other)
{
Set(v3Other);
return Sqrt();
}
// Magnitude
XnFloat XnV3DVector::Magnitude() const
{
return sqrt(MagnitudeSquared());
}
XnFloat XnV3DVector::MagnitudeSquared() const
{
return X() * X() +
Y() * Y() +
Z() * Z();
}
// Distance
XnFloat XnV3DVector::Distance(const XnV3DVector& v3Other) const
{
return sqrt(DistanceSquared(v3Other));
}
XnFloat XnV3DVector::DistanceSquared(const XnV3DVector& v3Other) const
{
return (*this-v3Other).MagnitudeSquared();
}
// Normalize
XnFloat XnV3DVector::Normalize()
{
XnFloat fLen = Magnitude();
if (fLen > m_fTolerance)
*this /= fLen;
else
Set(1, 0, 0);
return fLen;
}
// Orthogonal
XnV3DVector& XnV3DVector::OrthogonalVector(const XnV3DVector& v3Other)
{
XnFloat abs_x = fabs(v3Other.X()), abs_y = fabs(v3Other.Y()), abs_z = fabs(v3Other.Z());
if (abs_x < abs_y)
if (abs_x < abs_z)
Set(0, v3Other.Z(), -v3Other.Y());
else
Set(v3Other.Y(), -v3Other.X(), 0);
else
if (abs_y < abs_z)
Set(-v3Other.Z(), 0, v3Other.X());
else
Set(v3Other.Y(), -v3Other.X(), 0);
return *this;
}
XnV3DVector& XnV3DVector::UnitOrthogonalVector(const XnV3DVector& v3Other)
{
OrthogonalVector(v3Other);
Normalize();
return *this;
}
// Cross product
XnV3DVector XnV3DVector::operator^(const XnV3DVector& v3Rhs) const
{
XnV3DVector v3Result;
v3Result.CrossProduct(*this, v3Rhs);
return v3Result;
}
XnV3DVector& XnV3DVector::CrossProduct(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs)
{
return Set(v3Lhs.Y() * v3Rhs.Z() - v3Lhs.Z() * v3Rhs.Y(),
v3Lhs.Z() * v3Rhs.X() - v3Lhs.X() * v3Rhs.Z(),
v3Lhs.X() * v3Rhs.Y() - v3Lhs.Y() * v3Rhs.X());
}
// Dot Product
XnFloat XnV3DVector::operator|(const XnV3DVector& v3Rhs) const
{
return DotProduct(*this, v3Rhs);
}
XnFloat DotProduct(const XnV3DVector& v3Lhs, const XnV3DVector& v3Rhs)
{
return v3Lhs.X() * v3Rhs.X() +
v3Lhs.Y() * v3Rhs.Y() +
v3Lhs.Z() * v3Rhs.Z();
}
// Interpolation
XnV3DVector& XnV3DVector::Interpolate(const XnV3DVector& v3Vec1, const XnV3DVector& v3Vec2, XnFloat fAlpha)
{
return Set(v3Vec1.X() + fAlpha * (v3Vec2.X() - v3Vec1.X()),
v3Vec1.Y() + fAlpha * (v3Vec2.Y() - v3Vec1.Y()),
v3Vec1.Z() + fAlpha * (v3Vec2.Z() - v3Vec1.Z()));
}
XnBool XnV3DVector::IsSameDirection(const XnV3DVector& v3Other) const
{
if (IsZero() || v3Other.IsZero())
{
return true;
}
XnFloat fRatio = 0;
if (!XnVMathCommon::IsZero(X(), m_fTolerance) && !XnVMathCommon::IsZero(v3Other.X(), m_fTolerance))
fRatio = v3Other.X()/X();
else if (!XnVMathCommon::IsZero(Y(), m_fTolerance) && !XnVMathCommon::IsZero(v3Other.Y(), m_fTolerance))
fRatio = v3Other.Y()/Y();
else if (!XnVMathCommon::IsZero(Z(), m_fTolerance) && !XnVMathCommon::IsZero(v3Other.Z(), m_fTolerance))
fRatio = v3Other.Z()/Z();
else
{
// Combination sof zeros, though not all zeros!
return false;
}
if (v3Other/fRatio == (*this))
return true;
return false;
}
#endif
Sensor-Stable-5.1.0.41/Include/XnEE/XnVAudioBuffer.h 0000664 0000000 0000000 00000006712 11701035512 0021604 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_AUDIO_BUFFER_H_
#define _XNV_AUDIO_BUFFER_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVStream.h"
#include "XnVStreamData.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This object holds an audio buffer.
* A XnVAudioBuffer instance should be initialized either by XnVStream or
* by another XnVImageMap instance using the Clone method.
*/
class XN_EE_CORE_API XnVAudioBuffer : public XnVStreamData
{
public:
XnVAudioBuffer(XnVStream* pStream, XnBool bIsLive = FALSE, XnBool bWaitForDataUpdate = FALSE);
XnVAudioBuffer();
virtual ~XnVAudioBuffer();
XnStatus Initialize(const XnVAudioBuffer& abOther);
XnStatus Clone(XnVAudioBuffer& abOther) const;
XN_AUDIO_TYPE* Data();
const XN_AUDIO_TYPE* Data() const;
XN_AUDIO_TYPE &operator[](XnInt32 nIndex);
const XN_AUDIO_TYPE &operator[](XnInt32 nIndex) const;
// properties
XnUInt32 GetBufferAllocatedSize() { return m_nBufferAllocatedSize; }
inline XnUInt16 GetNumberOfChannels() const { return m_nNumberOfChannels; }
inline XnSampleRate GetSampleRate() const { return m_nSampleRate; }
XN_3_6_API XnUInt32 GetBufferSize() const { return GetDataSize(); }
XN_3_6_API void SetBufferSize(XnUInt32 nBufferSize) { m_nBufferSize = nBufferSize; }
void Clear();
XnStatus CopyFrom(const XnVAudioBuffer& ab, XnUInt64 nTimestamp = 0);
protected:
XnStatus ReadPropertiesFromStream();
private:
XN_AUDIO_TYPE* m_pData;
XnUInt16 m_nNumberOfChannels;
XnUInt32 m_nBufferAllocatedSize;
XnUInt32 m_nBufferSize;
XnSampleRate m_nSampleRate;
};
#endif //_XNV_AUDIO_BUFFER_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVBodyPart.h 0000664 0000000 0000000 00000005162 11701035512 0021133 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_BODY_PART_H
#define _XNV_BODY_PART_H
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This object holds a single body part. A basic body part is defined by a point and confidence.
*/
class XN_EE_FW_API XnVBodyPart
{
public:
XnVBodyPart()
{}
XnVBodyPart(const XnVBodyPart& other)
{
m_Confidence = other.Confidence();
m_Position = other.m_Position;
}
const XnFloat& Confidence() const
{return m_Confidence;}
XnFloat& Confidence()
{return m_Confidence;}
const XnVPoint& Position() const
{return m_Position;}
XnVPoint& Position()
{return m_Position;}
protected:
XnFloat m_Confidence;
XnVPoint m_Position;
};
#endif
Sensor-Stable-5.1.0.41/Include/XnEE/XnVBoundingBox.h 0000664 0000000 0000000 00000007062 11701035512 0021626 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_BOUNDING_BOX_H_
#define _XNV_BOUNDING_BOX_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVPoint.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a 3D bounding box. It doesn't hold the specific points that define it,
* only the number of these points and the current maximum and minimum values for each
* axis, which defines the bounding box.
*/
class XN_EE_CORE_API XnVBoundingBox
{
public:
XnVBoundingBox();
XnVBoundingBox(const XnVPoint& pt1, const XnVPoint& pt2);
/**
* Add a point to the set, and adjust the bounding box accordingly.
*
* @param [in] ptNewPoint The point to add
*/
void AddPoint(const XnVPoint& ptNewPoint);
void AddPoint(XnFloat fX, XnFloat fY, XnFloat fZ);
/**
* Get the minimum point of the Real World bounding box.
*/
inline const XnVPoint& GetMins() const
{
return m_ptMins;
}
/**
* Get the maximum point of the Real World bounding box.
*/
inline const XnVPoint& GetMaxs() const
{
return m_ptMaxs;
}
inline XnUInt32 GetSize() const
{
return m_nSize;
}
XnBool IsPointWithin(const XnVPoint& pt) const;
/**
* If maximum of any axis is more than the resolution for it, it's changed to the resolution.
* As a side effect, if the minimum is negative, it's changed to 0.
*
* @param [in] nXRes X-axis maximum value
* @param [in] nYRes Y-axis maximum value
* @param [in] nZRes Z-axis maximum value
*/
void CutToResolution(XnUInt16 nXRes, XnUInt16 nYRes, XnUInt16 nZRes);
void Clear();
inline XnBool IsValid() const
{
return (m_nSize > 0);
}
protected:
XnUInt32 m_nSize;
XnVPoint m_ptMins;
XnVPoint m_ptMaxs;
};
#endif //_XNV_BOUNDING_BOX_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVCenterOfMass.h 0000664 0000000 0000000 00000005161 11701035512 0021737 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_CENTER_OF_MASS_H_
#define _XNV_CENTER_OF_MASS_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVDepthMap.h"
#include "XnVStatus.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* Calculate projective Center of Mass - the average of all pixels that have depth.
*/
class XN_EE_FW_API XnVCenterOfMass
{
public:
XnVCenterOfMass()
{}
/**
* Calculates the center of mass of the given depth map
*
* @param dmMap [in] The depth map on which to run
* @param ptCoM [out] The center of mass found.
*
* @return XN_STATUS_OK on success, XNV_STATUS_NOT_ENOUGH_INFORMATION if no points exist in the depth map.
*/
XnStatus Run(const XnVDepthMap& dmMap, XnVPoint& ptCoM);
};
#endif //_XNV_CENTER_OF_MASS_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVClosestPointFinder.h 0000664 0000000 0000000 00000005227 11701035512 0023167 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_CLOSEST_POINT_FINDER_H_
#define _XNV_CLOSEST_POINT_FINDER_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVDepthMap.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* Calculate Projective Closest Point - find the minimum value of depth and the
* pixel it was found in.
*/
class XN_EE_FW_API XnVClosestPointFinder
{
public:
XnVClosestPointFinder()
{}
/**
* Find the closest point in the given depth map
*
* @param [in] dmMap The depth map on which to run
* @param [out] ptClosest The closest point in the depth map
*
* @return XN_STATUS_OK on success, XNV_STATUS_NOT_ENOUGH_INFORMATION if no points exist in the depth map.
*/
XnStatus Run(const XnVDepthMap& dmMap, XnVPoint& ptClosest);
};
#endif //_XNV_CLOSEST_POINT_FINDER_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVConnectedComponentDetector.h 0000664 0000000 0000000 00000012732 11701035512 0024667 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_CONNECTED_COMPONENT_DETECTOR_H_
#define _XNV_CONNECTED_COMPONENT_DETECTOR_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVDepthMap.h"
#include "XnVObject.h"
#include "XnVLabelMatrix.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* The Connected Component Detection algorithm goes over a XnVDepthMap and fills
* a XnVLabelMatrix object.
* A Connected Component is defined in the following way:
* Two neighboring pixels are in the same Connected Component iff
* their absolute depth difference is smaller than a certain threshold.
* This algorithm goes over the input XnVDepthMap, and finds all the
* Connected Components, giving each of them a unique XnVObject::XnVLabel,
* and updating the XnVLabelMatrix with the label in the position matching the pixel.
* A pixel that doesn't belong to any Connected Component, either because it has
* no depth, or because its Connected Component was smaller than the size threshold
* and was therefore disregarded, gets label 0.
* Any other Connected Component gets a label from 1 and onwards.
* There may be lapses in the label numbering, since the numbering is done before
* the Connected Components that are too small are removed.
* This algorithm has no memory: running it on different XnVDepthMap
* (even if it's the next frame) won't necessarily result in the
* "same" Connected Component getting the same label.
*/
class XN_EE_FW_API XnVConnectedComponentDetector
{
public:
XnVConnectedComponentDetector();
~XnVConnectedComponentDetector();
/**
* Label the depth map with connected components labels.
* All members of a connected component have the same label.
*
* @param [in] dmMap The depth map on which to run
* @param [out] vmLabels A matrix of labels, where the label at (x,y) represents the label of pixel (x,y)
*
* @return XN_STATUS_OK on success
*/
XnStatus Run(const XnVDepthMap& dmMap, XnVLabelMatrix& vmLabels);
/**
* Change the minimal size of ConnectedComponent allowed. This is measured in ratio to the resolution.
* For example, if the ratio is 320, and resolution is 640*480, then the minimal CC will be of size (640*480)/320=960 pixels.
* The default value is 320.
*
* @param [in] nRatio The new ratio
*/
void SetMinCCSizeRatio(XnUInt32 nRatio);
XnUInt32 GetMinCCSizeRatio() const;
/**
* Change the maximal depth distance (in mm) between neighbors that are in the same Connected Component.
* The default value is 100 (10cm)
*
* @param [in] nDistance The new Distance.
*/
void SetMaxNeighborDistance(XnInt32 nDistance);
XnInt32 GetMaxNeighborDistance() const;
protected:
class XN_EE_FW_API XnVDisjointSet
{
public:
XnVDisjointSet();
~XnVDisjointSet();
inline void Resize(XnUInt32 nSize);
inline XnUInt32 Unite(XnUInt32 i, XnUInt32 j);
inline void Clear();
inline XnUInt16& operator[](XnInt32 nIndex);
inline const XnUInt16& operator[](XnInt32 nIndex) const;
protected:
void SetRoot(XnUInt32 i, XnUInt32 nRoot);
XnUInt32 FindRoot(XnUInt32 i);
XnUInt32 m_nSize;
XnUInt16* m_vSet;
};
XnUInt32 m_nSetSize;
XnUInt32 m_nCounters;
XnUInt32* m_vCounters;
XnVDisjointSet m_vDisjointSet;
XnUInt32 m_nMinCCSizeRatio; // Minimal size of CC to exist is (xres*yres)/ratio
XnInt32 m_nMaxNeighborDistance; // Maximal distance for neighbor to be in the same Connected Component
};
//---------------------------------------------------------------------------
// Exported Function Declaration
//---------------------------------------------------------------------------
#endif //_XNV_CONNECTED_COMPONENT_DETECTOR_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVContainer.h 0000664 0000000 0000000 00000010705 11701035512 0021330 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_CONTAINER_H_
#define _XNV_CONTAINER_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include "XnVStatus.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a general container.
* It can either be initialized by the size it should be in, or by a buffer already
* allocated outside.
* All functionalities that change the size of the container are disabled if
* the buffer was supplied by the user.
*/
class XN_EE_CORE_API XnVContainer
{
public:
/**
* Create a new container, initializing the buffer it will use.
*
* @param [in] pBuffer The buffer in which to implement the container
* @param [in] nCapacity Maximum elements in the container
* @param [in] nElSize The size of each element
*/
XnVContainer(void* pBuffer, XnUInt32 nCapacity, XnUInt16 nElSize);
/**
* Create a new container, using a user-supplied buffer.
*
* @param [in] nCapacity Maximum elements in the container
* @param [in] nElSize The size of each element
*/
XnVContainer(XnUInt32 nCapacity, XnUInt16 nElSize);
virtual ~XnVContainer();
/**
* Change the buffer on which the container is implemented.
*
* @param [in] pBuffer The new buffer
* @param [in] nCapacity The buffer's capacity
*/
XnStatus ReAdjust(void* pBuffer, XnUInt32 nCapacity);
/**
* Change the buffer on which the container is implemented.
* This function works only on containers which allocated their own internal buffer.
*
* @param [in] nCapacity The new buffer's capacity
*/
XnStatus ReAdjust(XnUInt32 nCapacity);
XnStatus Add(void* pData); // copies size of nSize!
XnStatus SetAt(XnUInt32 nIndex, void* pData);
inline void* GetAt(XnUInt32 nPosition) const
{
return (XnChar*)m_pBuffer + nPosition * m_nElSize;
}
inline void* GetNext(void* pPrevious) const
{
return (XnChar*)pPrevious + m_nElSize;
}
inline void* GetPrevious(void* pOriginal) const
{
return (XnChar*)pOriginal - m_nElSize;
}
inline XnUInt32 GetSize() const
{
return m_nElCount;
}
inline XnUInt32 GetCapacity() const
{
return m_nCapacity;
}
inline void* Data()
{
return m_pBuffer;
}
inline const void* Data() const
{
return m_pBuffer;
}
inline XnBool IsExternal() const
{
return !m_bAllocated;
}
inline void Clear()
{
m_nElCount = 0;
}
inline XnUInt16 GetElSize() const
{
return m_nElSize;
}
protected:
XnStatus Resize(XnUInt32 nNewCapacity);
XnUInt16 m_nElSize;
XnUInt32 m_nCapacity;
XnUInt32 m_nElCount;
void* m_pBuffer;
XnBool m_bAllocated;
};
#endif //_XNV_CONTAINER_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVDepthMap.h 0000664 0000000 0000000 00000012077 11701035512 0021114 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_DEPTH_MAP_H_
#define _XNV_DEPTH_MAP_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVDepthRepresentation.h"
#include "XnVDepthMatrix.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a specific representation of the depth, and implements XnVDepthRepresentation.
* This object holds the depth using XnVDepthMatrix.
* A XnVDepthMap instance should be initialized either by XnVStreamDetails or
* by another XnVDepthMap instance using the Clone method.
* If initialization was done using a buffer and resolution, it may not be valid
* for certain algorithms, which need the internal XnVStreamDetails
* and/or XnVRealWorldTranslator.
*/
class XN_EE_CORE_API XnVDepthMap : public XnVDepthRepresentation
{
public:
/**
* Create a Depth Map.
* Depth map is invalid - must later be Initialize()d or Clone()d.
*/
XnVDepthMap();
/**
* Create a Depth Map.
* Buffer used will be the input stream's buffer.
*
* @param [in] pStream Stream describing the depth map.
* @param [in] bIsLive TRUE if the map is connected to a stream and updated. After each map update, UnderlyingStreamUpdated should be called.
* @param [in] bWaitForDataUpdate TRUE to make the map update its properties only after a call to UnderlyingStreamUpdated.
*/
XnVDepthMap(XnVStream* pStream, XnBool bIsLive = FALSE, XnBool bWaitForDataUpdate = FALSE);
/**
* Create a Depth Map.
* Buffer used will be the one supplied as parameter.
*
* @param [in] pBuffer The buffer to be used as the depth map.
* @param [in] nXRes X resolution of depth map.
* @param [in] nYRes Y resolution of depth map.
*/
XnVDepthMap(XnDepthPixel* pBuffer, XnUInt16 nXRes, XnUInt16 nYRes);
virtual ~XnVDepthMap();
/**
* Clone the depth map into another.
* Buffer used in other depth map is allocated and copied from this one.
*
* @param [out] dmOther The other depth map, that will have the same data as this one.
*/
XnStatus Clone(XnVDepthMap& dmOther) const;
/**
* Initialize the depth map based on another. It will take the other depth map's meta data
* such as stream information.
* Buffer used is allocate and cleared.
*
* @param [in] dmOther The other depth map, which will be the base for this one.
* @param [in] nXRes X resolution for this depth map.
* @param [in] nYRes Y resolution for this depth map.
* @param [in] nXOffset X-axis offset into the other depth map.
* @param [in] nYOffset Y-axis offset into the other depth map.
*/
XnStatus Initialize(const XnVDepthMap& dmOther, XnUInt16 nXRes, XnUInt16 nYRes, XnUInt16 nXOffset = 0, XnUInt16 nYOffset = 0);
XnDepthPixel* Data();
const XnDepthPixel* Data() const;
XnDepthPixel& operator[](XnUInt32 nIndex);
const XnDepthPixel& operator[](XnUInt32 nIndex) const;
XnDepthPixel& operator()(XnInt32 nX, XnInt32 nY);
const XnDepthPixel& operator()(XnInt32 nX, XnInt32 nY) const;
void Clear();
XnStatus SetBuffer(void* pBuffer, XnUInt16 nXRes, XnUInt16 nYRes);
XnStatus ReAdjust(XnUInt16 nXRes, XnUInt16 nYRes);
XnStatus CopyFrom(const XnVDepthMap& dm, XnUInt64 nTimestamp = 0);
protected:
XnStatus ReadPropertiesFromStream();
XnVDepthMatrix m_pDepth;
};
#endif //_XNV_DEPTH_MAP_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVDepthMatrix.h 0000664 0000000 0000000 00000006161 11701035512 0021640 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_DEPTH_MATRIX_H_
#define _XNV_DEPTH_MATRIX_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVMatrix.h"
/**
* This object is a specific XnVMatrix, which holds XnDepthPixel, and should be used
* for holding depths.
* It is used by XnVDepthMap.
*/
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_EE_CORE_API XnVDepthMatrix : public XnVMatrix
{
public:
XnVDepthMatrix(XnDepthPixel* pBuffer, XnUInt16 nXRes, XnUInt16 nYRes) :
XnVMatrix(pBuffer, nXRes, nYRes, sizeof(XnDepthPixel))
{}
XnVDepthMatrix(XnUInt16 nXRes, XnUInt16 nYRes) :
XnVMatrix(nXRes, nYRes, sizeof(XnDepthPixel))
{}
operator XnDepthPixel*()
{
return (XnDepthPixel*)Data();
}
operator const XnDepthPixel*() const
{
return (const XnDepthPixel*)Data();
}
inline const XnDepthPixel& operator[](XnInt32 nIndex) const
{
return ((XnDepthPixel*)Data())[nIndex];
}
inline XnDepthPixel& operator[](XnInt32 nIndex)
{
return ((XnDepthPixel*)Data())[nIndex];
}
inline const XnDepthPixel& operator()(XnInt32 nX, XnInt32 nY) const
{
return (*this)[nY*m_nXRes+nX];
}
inline XnDepthPixel& operator()(XnInt32 nX, XnInt32 nY)
{
return (*this)[nY*m_nXRes+nX];
}
};
#endif //_XNV_DEPTH_MATRIX_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVDepthRepresentation.h 0000664 0000000 0000000 00000007634 11701035512 0023404 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_DEPTH_REPRESENTATION_H_
#define _XNV_DEPTH_REPRESENTATION_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVStream.h"
#include "XnVRealWorldTranslator.h"
#include "XnVStatus.h"
#include "XnVPixelStreamData.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a general representation of depths.
* It holds the resolutions, the instance of XnVStreamDetails that was used to create
* the XnVDepthRepresentation and an instance of XnVRealWorldTranslator,
* to translate between Projective and Real World coordinations
* according to the resolutions and offset specifics.
* Its single implemented subclass is XnVDepthMap.
*/
class XN_EE_CORE_API XnVDepthRepresentation : public XnVPixelStreamData
{
public:
typedef enum {
XNV_UNKNOWN,
XNV_PROJECTIVE,
XNV_REAL_WORLD
} XnVProjectionMode;
XnVDepthRepresentation();
XnVDepthRepresentation(XnVStream* pStream, XnBool bIsLive = FALSE, XnBool bWaitForDataUpdate = FALSE);
XnVDepthRepresentation(XnUInt16 nXRes, XnUInt16 nYRes);
virtual ~XnVDepthRepresentation();
XnStatus Initialize(const XnVDepthRepresentation& drOther, XnUInt16 nXOffset, XnUInt16 nYOffset, XnUInt16 nXRes, XnUInt16 nYRes);
void SetMode(XnVProjectionMode mode);
XnVProjectionMode GetMode() const;
inline XnDepthPixel GetZMin() const { return m_nZMin; }
inline XnDepthPixel GetZRes() const { return m_nZRes; }
inline XnDepthPixel GetNoSampleValue() const { return m_nNoSampleValue; }
inline XnDepthPixel GetShadowValue() const { return m_nShadowValue; }
inline XnVRealWorldTranslator* GetRealWorldTranslator() const { return m_pRWTranslator; }
protected:
XnStatus ReadPropertiesFromStream();
private:
XN_3_6_PUBLIC_MEMBER XnDepthPixel m_nZMin;
XN_3_6_PUBLIC_MEMBER XnDepthPixel m_nZRes;
XN_3_6_PUBLIC_MEMBER XnDepthPixel m_nNoSampleValue;
XN_3_6_PUBLIC_MEMBER XnVRealWorldTranslator* m_pRWTranslator;
XN_3_6_PUBLIC_MEMBER XnDepthPixel m_nShadowValue;
XN_3_6_PUBLIC_MEMBER XnVProjectionMode m_eMode;
};
#endif //_XNV_DEPTH_REPRESENTATION_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVDevice.h 0000664 0000000 0000000 00000070775 11701035512 0020622 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_DEVICE_H_
#define _XNV_DEVICE_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include "XnVStreamContainer.h"
#include "XnVDepthMap.h"
#include "XnVImageMap.h"
#include "XnVAudioBuffer.h"
#include "XnVStatus.h"
#include "XnVPropertySet.h"
#include "XnVEventHandlers.h"
#include
#ifdef XN_USE_DEVICE_3_6
#include "XnVDeviceCallbackHandler.h"
#include "XnVInitStreamProperties.h"
#include "XnStream.h"
#include "XnIOParams.h"
#else
class XnVDeviceCallbackHandler;
class XnVInitStreamProperties;
#endif
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
#ifdef XN_USE_DEVICE_3_6
#define XNV_DEVICE_QVGA_XRES 320
#define XNV_DEVICE_QVGA_YRES 240
#define XNV_DEVICE_QVGA_YRES_V1 256
#define XNV_DEVICE_VGA_XRES 640
#define XNV_DEVICE_VGA_YRES 480
#define XNV_DEVICE_VGA_YRES_V1 512
#define XNV_DEVICE_SXGA_XRES 1280
#define XNV_DEVICE_SXGA_YRES 1024
#endif
#ifdef XN_USE_DEVICE_3_6
#define XN_IS_3_6 TRUE
#else
#define XN_IS_3_6 FALSE
#endif
#define XNV_SENSOR_CONSTANT 1280
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XnProperty; // forward declaration
// start v3.6 section - disable deprecated warnings
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
/**
* This is generally the first entry point to the Experience Engine.
* It represents a device of any kind, and once initialized supplies Read() or Write()
* capabilities, according to the open mode and the specific device capabilities.
* In order to get the current frame, GetDepthMap() and GetImageMap() can be called,
* which will return pointers to XnVDepthMap and XnVImageMap, respectively.
* These pointers can be used through frames - once Read() is called again,
* The internal buffer of the XnVDepthMap and XnVImageMap are overwritten.
*/
class XN_EE_CORE_API XnVDevice : public XnVStreamContainer, private XnVStreamCollectionChangedHandler
{
public:
/**
* Initialize Engine Core
*
* @param [in] strINIFile File name, from which to take Core:Security and IO:WorkingDirectory
*/
static XnStatus EngineInit(const XnChar* strINIFile);
static XnStatus EngineInit(const XnChar* strSecurityString, const XnChar* strWorkingDirectory);
static XnStatus EngineShutdown();
/**
* A device is initially unusable, until it is opened.
*/
XnVDevice(XnBool bUse36 = XN_IS_3_6)
{
Ctor(bUse36);
}
virtual ~XnVDevice();
/**
* Enumerates available devices.
*
* @param aConnectionStrings [in/out] An array to be filled with connection strings.
* @param pnCount [in/out] In: the size of the array. Out: the number of elements filled in the array.
*
* @returns XN_STATUS_OUTPUT_BUFFER_OVERFLOW The size of the array is too small. In this case, pnCount will hold needed size.
*/
XnStatus Enumerate(XnConnectionString* aConnectionStrings, XnUInt32* pnCount);
/**
* Creates a device using definitions from an INI file.
*
* @param [in] strIniFileName INI file to use for initialization.
* @param [in] strSectionName section name in INI file that describes the device.
* @param [in] pInitialValues [Optional] When provided, contains values to be overridden in created device.
*/
XnStatus CreateFromINI(const XnChar* strIniFileName, const XnChar* strSectionName, XnVPropertySet* pInitialValues = NULL);
/**
* Creates a device using a connection string.
*
* @param [in] strConnectionString Connection string.
* @param [in] Mode The mode in which device should be opened.
* @param [in] pInitialValues [Optional] When provided, contains values to be overridden in created device.
* @param [in] Sharing [Optional] Can change the sharing mode of the device.
*/
XnStatus CreateByConnectionString(XnConnectionString strConnectionString, XnDeviceMode Mode, XnVPropertySet* pInitialValues = NULL, XnDeviceSharingMode Sharing = XN_DEVICE_EXCLUSIVE);
/**
* Creates a sensor device.
*
* @param [in] strSensorID ID of the sensor to connect to.
* @param [in] pInitialValues [Optional] When provided, contains values to be overridden in created device.
* @param [in] Sharing [Optional] Can change the sharing mode of the sensor.
*/
XnStatus CreateSensor(const XnChar* strSensorID, XnVPropertySet* pInitialValues = NULL, XnDeviceSharingMode Sharing = XN_DEVICE_EXCLUSIVE);
/**
* Creates a file device.
*
* @param [in] strFileName Path of the file to open.
* @param [in] Mode The mode in which device should be opened.
* @param [in] pInitialValues [Optional] When provided, contains values to be overridden in created device.
*/
XnStatus CreateFileDevice(const XnChar* strFileName, XnDeviceMode Mode, XnVPropertySet* pInitialValues = NULL);
/**
* Configures a device from an INI file.
*
* @param [in] strIniFileName INI file to use for initialization.
* @param [in] strSectionName section name in INI file that describes the device.
*/
XnStatus ConfigureFromINI(const XnChar* strIniFileName, const XnChar* strSectionName);
/**
* Creates and configures a device using an INI file, and opens it for reading.
*
* @param [in] strIniFileName INI file to use for initialization.
* @param [in] strSectionName section name in INI file that describes the device.
* @param [in] pInitialValues [Optional] When provided, contains values to be overridden in created device.
*/
XnStatus OpenDeviceFromINI(const XnChar* strIniFileName, const XnChar* strSectionName, XnVPropertySet* pInitialValues = NULL);
/**
* Creates and configures a sensor using a configuration set.
*
* @param [in] strSensorID ID of the sensor to connect to.
* @param [in] Initializer A configuration set to use.
* @param [in] Sharing [Optional] Can change the sharing mode of the sensor.
*/
XnStatus OpenSensor(const XnChar* strSensorID, XnVPropertySet& InitialValues, XnDeviceSharingMode Sharing = XN_DEVICE_EXCLUSIVE);
/**
* Creates a read file device, and opens all streams for reading.
*
* @param [in] strFileName Path of the file to open.
*/
XnStatus OpenFileForReading(const XnChar* strFileName);
/**
* Creates a write file device, and configures it using a configuration set.
*
* @param [in] strFileName Path of the file to open.
* @param [in] Initializer A configuration set to use.
*/
XnStatus OpenFileForWriting(const XnChar* strFileName, XnVPropertySet& InitialValues);
/**
* Close the device.
*/
XnStatus Close();
/**
* Gets a list of stream types this device supports.
*/
XnStatus GetSupportedStreams(const XnChar** aStreamTypes, XnUInt32* pnStreamTypesCount) const;
/**
* Creates a new stream in the device.
*
* @param [in] strType The type of the stream to create
* @param [in] strName The name to give the new stream. If NULL then type will also be used as the name.
* @param [in] pInitialValues [Optional]. When provided, values in the set will replace default values in the newly created stream.
*/
XnStatus AddStream(const XnChar* strType, const XnChar* strName = NULL, const XnVPropertySet* pInitialValues = NULL);
/**
* Removes a stream from the device.
*
* @param [in] strName The name of the stream to remove.
*/
XnStatus RemoveStream(const XnChar* strName);
/**
* Opens a stream for reading/writing.
*
* @param [in] strName The name of the stream to open.
*/
XnStatus OpenStream(const XnChar* strName);
/**
* Closes an open stream.
*
* @param [in] strName The name of the stream to close.
*/
XnStatus CloseStream(const XnChar* strName);
/**
* Opens all streams of the device.
*/
XnStatus OpenAllStreams();
/**
* Closes all streams of the device.
*/
XnStatus CloseAllStreams();
/**
* Gets the device current timestamp.
*/
XnStatus TellTime(XnUInt64* pnTimestamp);
/**
* Seeks the device to the specified timestamp.
*/
XnStatus SeekTime(XnUInt64 nTimestamp);
/**
* Get the ID of the current frame.
*
* @param [out] pnFrameID The ID of the current frame.
*/
XnStatus TellFrame(XnUInt32* pnFrameID);
/**
* Move to a specific frame
*
* @param [in] nFrameID The ID of the target frame.
*/
XnStatus SeekFrame(XnUInt32 nFrameID);
/**
* Check if a module (or stream) is available on the device.
*
* @param [in] strModule Name of the Module or Stream
*/
XnStatus DoesModuleExist(const XnChar* strModule, XnBool* pbDoesExist) const;
/**
* Check if a specific property exists on the module.
* Possible Property names are available in XnStreamParams.h
*
* @param [in] strModule Name of the Module or Stream
* @param [in] strProperty Name of the property
*/
XnStatus DoesPropertyExist(const XnChar* strModule, const XnChar* strProperty, XnBool* pbDoesExist) const;
XnStatus GetAllProperties(XnVPropertySet& PropertySet, const XnChar* strModule) const;
virtual XnStatus GetAllProperties(XnVPropertySet& PropertySet, XnBool bNoStreams = FALSE, const XnChar* strModule = NULL) const;
XnStatus GetStreamNames(const XnChar** pstrStreamNames, XnUInt32* pnArraySize);
XnStatus FindStreamOfType(const XnChar* strType, XnVStream& stream);
XnStatus RegisterForPropertyChangedEvent(const XnChar* strModule, const XnChar* strProperty, XnVModulePropertyChangedHandler* pHandler, XnCallbackHandle* phCallback);
XnStatus RegisterForNewDataFromStreamEvent(XnVNewDataFromStreamHandler* pHandler, XnCallbackHandle* phCallback);
XnStatus RegisterForStreamCollectionChangedEvent(XnVStreamCollectionChangedHandler* pHandler, XnCallbackHandle* phCallback);
XnStatus UnregisterFromPropertyChangedEvent(const XnChar* strModule, const XnChar* strProperty, XnCallbackHandle hCallback);
XnStatus UnregisterFromNewDataFromStreamEvent(XnCallbackHandle hCallback);
XnStatus UnregisterFromStreamCollectionChangedEvent(XnCallbackHandle hCallback);
XnStatus IsStreamSupported(const XnChar* strStream, XnBool* pbSupported) const;
/**
* Gets the stream data object related to the requested stream.
*
* @param [in] strStream Name of the stream.
* @param [out] pStreamData The stream data object of this stream.
*/
XnStatus GetStreamData(const XnChar* strStream, XnVStreamData*& pStreamData) const;
/**
* Read the next frame from the device into the data buffers.
*/
XnStatus Read();
/**
* Read the next frame from the device into the data buffers. Waits till specific stream is received.
*/
XnStatus Read(const XnChar* strStreamName);
/**
* Read the next frame from the device into the data buffers. Waits till specific stream is received.
*/
XnStatus Read(const XnVStream& Stream);
/**
* Copies data into a stream.
*/
XnStatus CopyFrom(XnVDevice& sourceDevice);
/**
* Write only a specific stream to the device. The device must be opened for writing.
*
* @param [in] Stream The stream from which to take the buffer to write to the device.
*/
XnStatus Write(XnVStream& Stream);
XnStatus Write(const XnChar* strStreamName);
/**
* Writes data to the underlying device. The device must be opened for writing.
*/
XnStatus Write();
inline XnVDepthMap* GetDepthMap()
{
return m_pdmDepthMap;
}
inline XnVImageMap* GetImageMap()
{
return m_pimImageMap;
}
inline XnVAudioBuffer* GetAudioBuffer()
{
return m_pabAudioBuffer;
}
/**
* Gets the IR map. If the device does not have a IR stream, NULL is returned.
*/
inline XnVImageMap* GetIRMap()
{
return m_pimIRMap;
}
inline const XnVDepthMap* GetDepthMap() const
{
return m_pdmDepthMap;
}
inline const XnVImageMap* GetImageMap() const
{
return m_pimImageMap;
}
inline const XnVAudioBuffer* GetAudioBuffer() const
{
return m_pabAudioBuffer;
}
inline const XnVImageMap* GetIRMap() const
{
return m_pimIRMap;
}
/**
* Get a specific type of stream, if available.
* Possible Stream names are available in XnStreamParams.h
*
* @param [in] strName Name of the Stream
* @param [out] Stream The Stream
*/
XnStatus GetStream(const XnChar* strName, XnVStream& Stream);
/**
* Get a specific type of module, if available.
* Possible Module names are available in XnStreamParams.h
*
* @param [in] strName Name of the Module
* @param [out] Module The Module
*/
XnStatus GetModule(const XnChar* strName, XnVModule& Module);
/**
* Get value of a property from some module.
*
* @param [in] strModule Name of the Module or Stream
* @param [in] strProperty Name of the Property
* @param [out] nValue The value of the Property
*/
XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt64& nValue) const;
XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnDouble& fValue) const;
XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnChar* pcsValue) const;
XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, const XnGeneralBuffer& gbValue) const;
XnStatus GetPropertyType(const XnChar* strModule, const XnChar* strProperty, XnPropertyType& nType);
/**
* Set value of a property in some module.
*
* @param [in] strModule Name of the Module or Stream
* @param [in] strProperty Name of the Property
* @param [in] nValue New value of the Property
*/
XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt64 nValue);
XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, XnDouble fValue);
XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, const XnChar* csValue);
XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, const XnGeneralBuffer& gbValue);
XnStatus BatchConfig(XnVPropertySet& ChangeSet);
protected:
void Ctor(XnBool b36);
private:
XnStatus Init();
XnStatus CloseImpl();
XnStatus CreateFromINIImpl(const XnChar* strIniFileName, const XnChar* strSectionName, XnVPropertySet* pInitialValues);
XnStatus CreateByConnectionStringImpl(XnConnectionString strConnectionString, XnDeviceMode Mode, XnVPropertySet* pInitialValues, XnDeviceSharingMode Sharing);
XnStatus CreateSensorImpl(const XnChar* strSensorID, XnVPropertySet* pInitialValues, XnDeviceSharingMode Sharing);
XnStatus CreateFileImpl(const XnChar* strFileName, XnDeviceMode Mode, XnVPropertySet* pInitialValues);
XnStatus UpdateAllStreams();
XnStatus GetProperty40(const XnChar* strModule, const XnChar* strProperty, XnDouble& fValue) const;
virtual XnStatus AddStreamToDevice(const XnChar* strName);
virtual XnStatus RemoveStreamFromDevice(const XnChar* strName);
virtual void OnStreamAdded(const XnChar* strName);
virtual void OnStreamRemoved(const XnChar* strName);
static XnBool IsXnVDeviceStreamProp(const XnChar* strProperty);
static void XN_CALLBACK_TYPE OnStreamsChangedCallback(XnDeviceHandle pDeviceHandle, const XnChar* StreamName, XnStreamsChangeEventType EventType, void* pCookie);
static void XN_CALLBACK_TYPE OnPropertyChangedCallback(XnDeviceHandle pDeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, void* pCookie);
static void XN_CALLBACK_TYPE OnNewStreamDataCallback(XnDeviceHandle pDeviceHandle, const XnChar* StreamName, void* pCookie);
static XnStatus XN_CALLBACK_TYPE OnXnVDevicePropertyChanged(const XnProperty* pSender, void* pCookie);
XnDeviceHandle m_DeviceHandle;
XnVDepthMap* m_pdmDepthMap;
XnVImageMap* m_pimImageMap;
XnVImageMap* m_pimIRMap;
XnVAudioBuffer* m_pabAudioBuffer;
XnBool m_bValid;
XnBool m_bWritable;
XnBool m_bIs36;
XnStreamDataSet* m_pStreamOutputSet;
XnStringsHash m_StreamsHash;
// for 3.6 BC
mutable XnStatus m_LastStatus;
XnVDeviceCallbackHandler* m_pCallbackHandler;
XnChar m_strPrimary[XN_DEVICE_MAX_STRING_LENGTH];
mutable XnGeneralBuffer m_D2STable;
mutable XnGeneralBuffer m_S2DTable;
protected:
XnStatus OpenFileRead(const XnChar* strFileName, XnVStreamContainer* pInitializer = NULL, XnVInitStreamProperties* pStreams = NULL);
XnStatus OpenFileWrite(const XnChar* strFileName, XnVStreamContainer* pInitializer = NULL, XnVInitStreamProperties* pStreams = NULL);
XnStatus GeneralOpenSensor(const XnChar* strType, const XnChar* strSensorID, XnVStreamContainer* pInitializer = NULL, XnVInitStreamProperties* pStreams = NULL);
public:
typedef XN_3_6_API enum
{
XNV_RES_DEFAULT,
XNV_RES_QVGA = XN_RESOLUTION_QVGA,
XNV_RES_VGA = XN_RESOLUTION_VGA,
XNV_RES_SXVGA = XN_RESOLUTION_SXGA,
} XnVResolution;
/**
* Initialize a device from an INI file. Calls EngineInit itself.
*
* @param [in] strIniFileName INI file to use for initialization.
* @param [in] strSectionName section name in INI file that describes the device.
* @param [in] pInitializer StreamContainer (XnVDevice) to use for the stream. NULL implies use of default.
*/
XN_3_6_API XnStatus OpenFromINI(const XnChar* strIniFileName, const XnChar* strSectionName, XnVStreamContainer* pInitializer = NULL);
/**
* Initialize a device from any sensor found connected to the host.
*
* @param [in] strSensorID connection string for the sensor
* @param [in] pInitializer StreamContainer (XnVDevice) to use for the stream. NULL implies use of default.
* @param [in] pStreams parameters for sensor initialization. NULL implies use of default.
*/
XN_3_6_API XnStatus OpenSensor(const XnChar* strSensorID, XnVStreamContainer* pInitializer = NULL, XnVInitStreamProperties* pStreams = NULL);
/**
* Initialize a device from a file.
*
* @param [in] strFileName .xns File to open as device
* @param [in] Mode mode in which to open the device: XN_DEVICE_MODE_READ or XN_DEVICE_MODE_WRITE
* @param [in] pInitializer StreamContainer (XnVDevice) to use for the stream. NULL implies use of default.
* @param [in] pStreams parameters to change in the initializer (or the default). NULL implies use of default.
*/
XN_3_6_API XnStatus OpenFile(const XnChar* strFileName, XnDeviceMode Mode, XnVStreamContainer* pInitializer = NULL, XnVInitStreamProperties* pStreams = NULL);
/**
* Check if a module (or stream) is available on the device.
*
* @param [in] strModule Name of the Module or Stream
*/
XN_3_6_API XnBool IsModuleExist(const XnChar* strModule);
/**
* Check if a specific property exists on the module.
* Possible Property names are available in XnStreamParams.h
*
* @param [in] strModule Name of the Module or Stream
* @param [in] strProperty Name of the property
*/
XN_3_6_API XnBool IsPropertyExist(const XnChar* strModule, const XnChar* strProperty);
/**
* This function sets the user callback handler for the device.
*
* @param pCallbackHandler [in] A pointer to a user-defined class which inherits from XnVDeviceCallbackHandler.
*/
XN_3_6_API XnStatus SetCallbackHandler(XnVDeviceCallbackHandler* pCallbackHandler);
/**
* Write data to the device. The device must be opened for writing.
*
* @param [in] strModule The stream under which to add the buffer.
* @param [in] pBuffer The buffer to add.
* @param [in] nSize The size of the buffer.
* @param [in] nTimeStamp The Timestamp of the written depth map.
*/
XN_3_6_API XnStatus Write(const XnChar* strModule, const XnChar* pBuffer, XnUInt32 nSize, XnUInt64 nTimeStamp = 0);
/**
* Write data to the device. The device must be opened for writing.
*
* @param [in] dmMap The Depth map to add as the Depth Stream.
* @param [in] nTimeStamp The Timestamp of the written depth map.
*/
XN_3_6_API XnStatus Write(XnVDepthMap& dmMap, XnUInt64 nTimeStamp = 0);
/**
* Write data to the device. The device must be opened for writing.
*
* @param [in] imMap The Image map to add as the Image Stream.
* @param [in] nTimeStamp The Timestamp of the written image map.
*/
XN_3_6_API XnStatus Write(XnVImageMap& imMap, XnUInt64 nTimeStamp = 0);
/**
* Write data to the device. The device must be opened for writing.
*
* @param [in] abBuffer The audio buffer to add as the Audio Stream.
* @param [in] nTimeStamp The Timestamp of the written audio buffer.
*/
XN_3_6_API XnStatus Write(XnVAudioBuffer& abBuffer, XnUInt64 nTimeStamp = 0);
/**
* Will be removed in a future version.
* For now, calling Write() just copies the buffers, but doesn't actually write to the device.
* This function actually writes to the device.
* It writes one buffer of each stream.
*/
XN_3_6_API XnStatus CommitWrite();
/**
* Get the last low level SDK's status.
*/
XN_3_6_API inline XnStatus GetLastStatus()
{
return m_LastStatus;
}
XN_3_6_API XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt16& nValue) const;
XN_3_6_API XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, void*& pValue) const;
XN_3_6_API XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt16 nValue);
XN_3_6_API XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt32 nValue);
XN_3_6_API XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, void* pValue);
// For possible parameters, take a look at XnIOParams.h
XN_3_6_API XnStatus SetIOParam(const XnChar* strParam, XnInt32 nValue);
XN_3_6_API XnStatus SetIOParam(const XnUInt32 nParam, XnInt32 nValue);
XN_3_6_API XnStatus SetIOParam(const XnUInt32 nParam, const void* pValue);
XN_3_6_API XnStatus GetIOParam(const XnChar* strParam, XnInt32& nValue) const;
XN_3_6_API XnStatus GetIOParam(const XnUInt32 nParam, XnInt32& nValue) const;
XN_3_6_API XnStatus GetIOParam(const XnUInt32 nParam, void* pValue) const;
XN_3_6_API XnStatus HandleDeviceCallback(XnUInt32 CallbackEvent, void* pCallbackData);
XN_3_6_API XnStatus EnableFlag(XnInt32 nFlag);
XN_3_6_API XnStatus DisableFlag(XnInt32 nFlag);
XN_3_6_API XnStatus FlipFlag(XnInt32 nFlag);
XN_3_6_API XnStatus GetFlag(XnInt32 nFlag, XnUInt32& nValue);
XN_3_6_API XnStatus StartCaptureMode(XnBool bNewFramesOnly);
XN_3_6_API XnStatus StopCaptureMode();
XN_3_6_API XnStatus AddStream(const XnChar* strName);
XN_3_6_API XnStatus AddStream(const XnChar* strName, const XnVStream& Stream);
private:
XN_3_6_API XnStatus Write36(XnVStream& Stream);
XN_3_6_API XnStatus GetDepthProperty(const XnChar* strProperty, XnUInt16& nValue) const;
XN_3_6_API XnStatus GetDepthProperty(const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus GetDepthProperty(const XnChar* strProperty, XnUInt64& nValue) const;
XN_3_6_API XnStatus GetDepthProperty(const XnChar* strProperty, void*& pValue) const;
XN_3_6_API XnStatus GetImageProperty(const XnChar* strProperty, XnUInt16& nValue) const;
XN_3_6_API XnStatus GetImageProperty(const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus GetImageProperty(const XnChar* strProperty, XnUInt64& nValue) const;
XN_3_6_API XnStatus GetIRProperty(const XnChar* strProperty, XnUInt16& nValue) const;
XN_3_6_API XnStatus GetIRProperty(const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus GetIRProperty(const XnChar* strProperty, XnUInt64& nValue) const;
XN_3_6_API XnStatus GetAudioProperty(const XnChar* strProperty, XnUInt16& nValue) const;
XN_3_6_API XnStatus GetAudioProperty(const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus GetAudioProperty(const XnChar* strProperty, XnUInt64& nValue) const;
XN_3_6_API XnStatus GetShiftsProperty(const XnChar* strProperty, XnUInt16& nValue) const;
XN_3_6_API XnStatus GetShiftsProperty(const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus GetShiftsProperty(const XnChar* strProperty, void*& pValue) const;
XN_3_6_API XnStatus GetFixedParamsProperty(const XnChar* strProperty, XnUInt16& nValue) const;
XN_3_6_API XnStatus GetFixedParamsProperty(const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus GetFixedParamsProperty(const XnChar* strProperty, XnDouble& fValue) const;
XN_3_6_API XnStatus GetDeviceProperty(const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus GetDeviceProperty(const XnChar* strProperty, void*& pValue) const;
XN_3_6_API XnStatus GetRegistrationProperty(const XnChar* strProperty, XnUInt16& nValue) const;
XN_3_6_API XnStatus GetRegistrationProperty(const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus SetDepthProperty(const XnChar *strProperty, XnUInt16 nValue);
XN_3_6_API XnStatus SetDepthProperty(const XnChar* strProperty, XnUInt32 nValue);
XN_3_6_API XnStatus SetDepthProperty(const XnChar* strProperty, XnUInt64 nValue);
XN_3_6_API XnStatus SetDepthProperty(const XnChar* strProperty, void* pValue);
XN_3_6_API XnStatus SetImageProperty(const XnChar* strProperty, XnUInt32 nValue);
XN_3_6_API XnStatus SetImageProperty(const XnChar* strProperty, XnUInt64 nValue);
XN_3_6_API XnStatus SetIRProperty(const XnChar* strProperty, XnUInt32 nValue);
XN_3_6_API XnStatus SetIRProperty(const XnChar* strProperty, void* pValue);
XN_3_6_API XnStatus SetAudioProperty(const XnChar* strProperty, XnUInt16 nValue);
XN_3_6_API XnStatus SetAudioProperty(const XnChar* strProperty, XnUInt32 nValue);
XN_3_6_API XnStatus SetAudioProperty(const XnChar* strProperty, XnUInt64 nValue);
XN_3_6_API XnStatus SetRegistrationProperty(const XnChar* strProperty, XnUInt32 nValue);
XN_3_6_API XnStatus SetDeviceProperty(const XnChar* strProperty, XnUInt32 nValue);
XN_3_6_API XnStatus SetDeviceProperty(const XnChar* strProperty, void* pValue);
XN_3_6_API XnStatus ConfigureFrom36Device(XnVDevice& otherDevice);
XN_3_6_API XnStatus ConfigureFileFrom36Device(XnVDevice& otherDevice);
XN_3_6_API XnStatus ConfigureDefault();
XN_3_6_API XnStatus ConfigureDevice36FromINI(const XnChar* strIniFileName, const XnChar* strSectionName, XnVStreamContainer* pInitializer);
XN_3_6_API XnStatus ConfigureFromOldINIFileAndOpen(const XnChar* cpINIFileName, const XnChar* cpINISectionName);
XN_3_6_API XnStatus ConfigureAGCDepthBinFromOldINIFile(const XnChar* cpINIFileName, const XnChar* cpINISectionName, XnUInt32 nBin, XnBool bMax);
XN_3_6_API XnStatus GetModuleIntProperty36(const XnChar* Module, const XnChar* Property, XnInt32* pnValue, XnBool bAllowModuleDontExist = FALSE, XnInt32 nValueIfOff = 0) const;
XN_3_6_API XnStatus CheckAudioStreamProperties36() const;
XN_3_6_API XnStatus InitS2DTables36() const;
XN_3_6_API XnStatus GetProperty36(const XnChar* strModule, const XnChar* strProperty, XnDouble& fValue) const;
static void XN_CALLBACK_TYPE OnS2DTableChanged36(XnDeviceHandle pDeviceHandle, const XnChar* ModuleName, const XnChar* PropertyName, void* pCookie);
static void XN_CALLBACK_TYPE OnNewStreamDataCallback36(XnDeviceHandle pDeviceHandle, const XnChar* StreamName, void* pCookie);
};
#pragma warning (pop)
#endif //_XNV_DEVICE_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVDeviceCallbackHandler.h 0000664 0000000 0000000 00000007147 11701035512 0023526 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_DEVICE_CALLBACK_HANDLER_H_
#define _XNV_DEVICE_CALLBACK_HANDLER_H_
class XnVDevice; // Forward declaration!
class XnVDepthMap; // Forward declaration!
struct XnCallbackSetRegData;
/**
* This class is the base class for classes processing callbacks from the device.
* One should inherit from this class, and implement the methods corresponding to the events he wish
* to handle.
* This base class contains empty implementations for the methods.
*/
class XN_3_6_API XN_EE_CORE_API XnVDeviceCallbackHandler
{
public:
virtual ~XnVDeviceCallbackHandler() {}
/**
* Called when a new depth frame is available.
*
* param [in] pSender The device which raised the event.
* param [in] dm The new depth map.
*/
virtual XnBool OnNewDepthFrameAvailable(XnVDevice* /*pSender*/, XnVDepthMap& /*dm*/) { return TRUE; }
/**
* Called when a new depth frame is available.
*
* param [in] pSender The device which raised the event.
* param [in] im The new image map.
*/
virtual XnBool OnNewImageFrameAvailable(XnVDevice* /*pSender*/, XnVImageMap& /*im*/) { return TRUE; }
/**
* Called when a new depth frame is available.
*
* param [in] pSender The device which raised the event.
* param [in] pBuffer A pointer to the audio data buffer.
* param [in] nBytes The number of bytes in the buffer.
*/
virtual XnBool OnNewAudioBufferAvailable(XnVDevice* /*pSender*/, XnVAudioBuffer& /*ab*/) { return TRUE; }
/**
* Called when a new client has connected to the device
*
* param [in] pSender The device which raised the event.
*/
virtual XnBool OnNewClient(XnVDevice* /*pSender*/) { return TRUE; }
/**
* Called when a client has changed a property of the device
*
* param [in] pSender The device which raised the event.
* param [in] pData Information about changed property.
*/
virtual XnBool OnClientSetReg(XnVDevice* /*pSender*/, XnCallbackSetRegData* /*pData*/) { return TRUE; }
};
#endif //_XNV_DEVICE_CALLBACK_HANDLER_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVDeviceRecorder.h 0000664 0000000 0000000 00000006331 11701035512 0022273 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_V_DEVICE_RECORDER_H__
#define __XN_V_DEVICE_RECORDER_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVDevice.h"
#include "XnVEventHandlers.h"
#include "XnVPropertySet.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XnVPropertiesHash;
class XN_EE_CORE_API XnVDeviceRecorder : protected XnVModulePropertyChangedHandler, protected XnVStreamCollectionChangedHandler
{
public:
XnVDeviceRecorder(XnVDevice* pSourceDevice, const XnChar* strFilePath);
~XnVDeviceRecorder();
XnStatus StartRecording(XnBool bAutoAddStreams = FALSE);
XnStatus StopRecording();
XnStatus AddStream(const XnChar* strName);
XnStatus RemoveStream(const XnChar* strName);
XnStatus WriteData();
inline XnVDevice* GetWriteDevice() const { return m_pWriter; }
protected:
void OnModulePropertyChanged(const XnChar* strModule, const XnChar* strProperty);
void OnStreamAdded(const XnChar* strStream);
void OnStreamRemoved(const XnChar* strStream);
private:
XnStatus RegisterForAllProps(XnVPropertySet& State);
XnStatus UnregisterFromAllProps(XnVPropertySet& State);
XnVDevice* m_pSource;
XnChar m_strFilePath[XN_DEVICE_MAX_STRING_LENGTH];
XnVDevice* m_pWriter;
XnVPropertiesHash* m_pPropsHash;
XnBool m_bAutoAddStreams;
XnList m_Streams;
XnCallbackHandle m_hStreamsCallback;
};
#endif //__XN_V_DEVICE_RECORDER_H__
Sensor-Stable-5.1.0.41/Include/XnEE/XnVDownscale.h 0000664 0000000 0000000 00000011337 11701035512 0021327 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_DOWNSCALE_H_
#define _XNV_DOWNSCALE_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVDepthMap.h"
#include "XnVImageMap.h"
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* Downscale the XnVDepthMap or XnVImageMap.
* Scaling is done in powers of 2, and can be done in one of two methods:
* The first algorithm uses the representative method.
* For each nxn pixel box (n being the scale requested) the top left pixel is used.
* The second algorithm uses the average method.
* For each nxn pixel box the average of the data (depth in XnVDepthMap,
* color in XnVImageMap) is used.
*/
class XN_EE_FW_API XnVDownscale
{
public:
/**
* Downscale methods:
* REPRESENTATIVE - use one of the 2nx2n box as the value of the downscaled
* AVERAGE - use an average of the 2nx2n box as the value of the downscaled
*/
typedef enum
{
XNV_DSM_REPRESENTATIVE,
XNV_DSM_AVERAGE,
XNV_DSM_UNKNOWN
} XnVDownscaleMethod;
XnVDownscale();
/**
* Downscale a depth map.
*
* @param [in] dmOrigMap The original depth map
* @param [out] dmNewMap The result depth map
* @param [in] nFactor The factor of the downscale. Must be a power of 2.
* @param [in] eDMethod The downscale method, use the average of an area or a single pixel in it.
*
* @return XN_STATUS_OK on success, XN_STATUS_EE_ILLEGAL_INPUT if factor isn't a power of 2, doesn't divide either resolution or the method is unknown.
*/
XnStatus Run(const XnVDepthMap& dmOrigMap, XnVDepthMap& dmNewMap, XnUInt16 nFactor, XnVDownscaleMethod eDMethod);
/**
* Downscale an image map.
*
* @param [in] imOrigMap The original image map
* @param [out] imNewMap The result image map
* @param [in] nFactor The factor of the downscale. Must be a power of 2.
* @param [in] eDMethod The downscale method, use the average of an area or a single pixel in it.
*
* @return XN_STATUS_OK on success, XN_STATUS_EE_ILLEGAL_INPUT if factor isn't a power of 2, doesn't divide either resolution or the method is unknown.
*/
XnStatus Run(const XnVImageMap& imOrigMap, XnVImageMap& imNewMap, XnUInt16 nFactor, XnVDownscaleMethod eDMethod);
protected:
XnStatus GetShiftSize(XnUInt16 nFactor, XnInt8& nShiftSize) const;
XnStatus UseOne(const XnVDepthMap& dmOrigMap, XnVDepthMap& dmNewMap, XnUInt8 nShiftSize);
XnStatus UseAverage(const XnVDepthMap& dmOrigMap, XnVDepthMap& dmNewMap, XnUInt8 nShiftSize, XnUInt16 nFactor);
XnStatus UseOne(const XnVImageMap& dmOrigMap, XnVImageMap& dmNewMap, XnUInt8 nShiftSize);
XnStatus UseAverage(const XnVImageMap& dmOrigMap, XnVImageMap& dmNewMap, XnUInt8 nShiftSize, XnUInt16 nFactor);
XnUInt16 m_DepthDifferenceAverageThreshold;
};
#endif //_XNV_DOWNSCALE_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVEventHandlers.h 0000664 0000000 0000000 00000005350 11701035512 0022150 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_V_EVENT_HANDLERS_H__
#define __XN_V_EVENT_HANDLERS_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include "XnVStatus.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_EE_CORE_API XnVModulePropertyChangedHandler
{
public:
virtual ~XnVModulePropertyChangedHandler() {}
virtual void OnModulePropertyChanged(const XnChar* strModule, const XnChar* strProperty) = 0;
};
class XN_EE_CORE_API XnVNewDataFromStreamHandler
{
public:
virtual ~XnVNewDataFromStreamHandler() {}
virtual void OnNewDataFromStream(const XnChar* strStream) = 0;
};
class XN_EE_CORE_API XnVStreamCollectionChangedHandler
{
public:
virtual ~XnVStreamCollectionChangedHandler() {}
virtual void OnStreamAdded(const XnChar* strStream) = 0;
virtual void OnStreamRemoved(const XnChar* strStream) = 0;
};
#endif //__XN_V_EVENT_HANDLERS_H__
Sensor-Stable-5.1.0.41/Include/XnEE/XnVExtremes.h 0000664 0000000 0000000 00000006764 11701035512 0021214 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_EXTREMES_H_
#define _XNV_EXTREMES_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVPoint.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This object is generally filled by XnVHumanStretch.
* This object holds 16 XnVPoint instances:
* For each quadrant (x,y quadrant, defined by a pivot XnVPoint to XnVHumanStretch)
* it holds four points - the extreme projective point in each of x and y
* (extreme being either minimum or maximum values, depending on the quadrant)
* and 2 points for z axis extremes - both the minimum z and maximum z.
*/
class XN_EE_FW_API XnVExtremes
{
public:
XnVExtremes()
{}
class XN_EE_FW_API XnVExtremeCandidate
{
public:
const XnVPoint& GetX() const;
XnVPoint& GetX();
const XnVPoint& GetY() const;
XnVPoint& GetY();
const XnVPoint& GetZMin() const;
XnVPoint& GetZMin();
const XnVPoint& GetZMax() const;
XnVPoint& GetZMax();
void SetX(XnVPoint& ptX);
void SetY(XnVPoint& ptY);
void SetZMin(XnVPoint& ptZMin);
void SetZMax(XnVPoint& ptZMax);
protected:
XnVPoint m_ptX;
XnVPoint m_ptY;
XnVPoint m_ptZMax;
XnVPoint m_ptZMin;
};
const XnVExtremeCandidate& GetTopRight() const;
XnVExtremeCandidate& GetTopRight();
const XnVExtremeCandidate& GetTopLeft() const;
XnVExtremeCandidate& GetTopLeft();
const XnVExtremeCandidate& GetBottomRight() const;
XnVExtremeCandidate& GetBottomRight();
const XnVExtremeCandidate& GetBottomLeft() const;
XnVExtremeCandidate& GetBottomLeft();
protected:
XnVExtremeCandidate m_TopRight, m_TopLeft, m_BottomRight, m_BottomLeft;
};
#endif //_XNV_EXTREMES_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVGeneralStaticMap.h 0000664 0000000 0000000 00000011526 11701035512 0022573 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_GENERAL_STATIC_MAP_H_
#define _XNV_GENERAL_STATIC_MAP_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVDepthMap.h"
#include "XnVDevice.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a general StaticMap base class.
* It implements the Save/Load functionality, as well as the Clean,
* which applies the internal XnVDepthMap instance to the input XnVDepthMap.
* It also implements some basic Reset and AddMap capabilities, as a framework
* for the specific sub classes, which will implement the specific AddMap and Reset
* relevant to the specific StaticMap implementation.
*/
class XN_EE_FW_API XnVGeneralStaticMap
{
public:
XnVGeneralStaticMap(const XnChar* strINIFile = NULL);
virtual ~XnVGeneralStaticMap();
/**
* Load a static map from file. The file name is given in the INI file supplied to the ctor.
* Static maps are saved in QVGA/VGA resolutions, and therefore can only be loaded in these resolutions.
*
* @param [in] nResolution The resolution.
*/
virtual XnStatus Load(XnUInt32 nResolution);
virtual XnStatus Load(XnResolutions nResolution);
virtual XnStatus Load(const XnChar* strFileName);
/**
* Save the current static map to 2 files: 1 for VGA and 1 for QVGA.
* The file names are given in the INI file supplied to the ctor.
* Saving in other resolutions will result in failure.
*/
virtual XnStatus Save();
virtual XnStatus Save(const XnChar* strFileName);
/**
* Discard the current static map.
*/
XnStatus Reset();
/**
* Each specific type of static map will have different things to do when adding a new map. This is the place for it.
*
* @param [in] dmMap A depth map to add to the static.
*/
virtual XnStatus AddMap(const XnVDepthMap& dmMap) = 0;
/**
* Clean the current depth map according to the static map.
* If resolutions don't match, the function will fail.
*
* @param [in,out] dmMap A depth map on which to apply the static map.
*
* @return XN_STATUS_OK on success, XNV_STATUS_RESOLUTION_MISMATCH if resolution doesn't match learned static.
*/
virtual XnStatus Clean(XnVDepthMap& dmMap);
/**
* Get the internal depth map. See the learned values per pixel in the static map.
*/
XnVDepthMap* GetDepthMap() const;
protected:
/**
* Each specific type of static map will have different things to do when resetting. This is the place for it.
*/
virtual XnStatus DoReset() = 0;
/**
* Do all general things needed before adding a new map. This includes checking resolutions match (and resetting if not)
* Specific AddMap functions should call this at the beginning.
*
* @param [in] dmMap A depth map to add to the static.
*/
XnStatus PreAddMap(const XnVDepthMap& dmMap);
virtual XnStatus Init(XnUInt32 nNewSize) = 0;
XnVDepthMap* m_pdmStaticMap;
XnBool m_bInit;
XnVDevice m_Device;
XnChar m_strVGAFile[80];
XnChar m_strQVGAFile[80];
XnBool m_bVGAExists, m_bQVGAExists;
};
#endif //_XNV_GENERAL_STATIC_MAP_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVHand.h 0000664 0000000 0000000 00000005341 11701035512 0020260 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_HAND_H
#define _XNV_HAND_H
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* A hand is comprised of its 3 joints: The shoulder, the elbow and the palm.
*/
class XN_EE_FW_API XnVHand
{
public:
XnVHand()
{}
XnVHand(const XnVHand& other)
{
this->m_Elbow = other.m_Elbow;
this->m_Palm = other.m_Palm;
this->m_Shoulder = other.m_Shoulder;
}
const XnVBodyPart& Shoulder() const
{return m_Shoulder;}
XnVBodyPart& Shoulder()
{return m_Shoulder;}
const XnVBodyPart& Elbow() const
{return m_Elbow;}
XnVBodyPart& Elbow()
{return m_Elbow;}
const XnVBodyPart& Palm() const
{return m_Palm;}
XnVBodyPart& Palm()
{return m_Palm;}
protected:
XnVBodyPart m_Shoulder;
XnVBodyPart m_Elbow;
XnVBodyPart m_Palm;
};
#endif
Sensor-Stable-5.1.0.41/Include/XnEE/XnVHead.h 0000664 0000000 0000000 00000005214 11701035512 0020246 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_HEAD_H
#define _XNV_HEAD_H
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* A head is a body part that has a front vector and an up vector.
*/
class XN_EE_FW_API XnVHead : public XnVBodyPart
{
public:
XnVHead()
{}
XnVHead(const XnVHead& other)
{
m_FrontVector = other.m_FrontVector;
m_UpVector = other.m_UpVector;
}
const XnV3DVector& FrontVector() const
{return m_FrontVector;}
XnV3DVector& FrontVector()
{return m_FrontVector;}
const XnV3DVector& UpVector() const
{return m_UpVector;}
XnV3DVector& UpVector()
{return m_UpVector;}
protected:
XnV3DVector m_FrontVector, m_UpVector;
};
#endif // _XNV_HEAD_H
Sensor-Stable-5.1.0.41/Include/XnEE/XnVHumanStretch.h 0000664 0000000 0000000 00000007743 11701035512 0022023 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_HUMAN_STRETCH_H_
#define _XNV_HUMAN_STRETCH_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVRealObject.h"
#include "XnVExtremes.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This algorithm receives a XnVRealObject and a dividing XnVPoint,
* and generates XnVExtremes object.
* It uses the XnVRealObject's internal XnVDepthMap, and finds
* maximum and minimum values of all axis in each quadrant defined by the dividng point.
* This means the output XnVExtremes object holds a total of 16 points:
* For each of the 4 quadrants created by the dividing point, an extreme x value,
* an extreme y value and 2 extreme z values are found.
*/
class XN_EE_FW_API XnVHumanStretch
{
public:
XnVHumanStretch();
/**
* Assuming the input is a human, find extremes which should represent hands and feet.
*
* @param [in] roObject The Real Object to run on
* @param [in] ptDivider Point by which to divide frame into quadrants.
* @param [out] exExtremes The extremeties found
*/
XnStatus Run(const XnVRealObject& roObject, const XnVPoint& ptDivider, XnVExtremes& exExtremes);
/**
* Get separate status for each extremity. This is relevant when Run() returned a value different than XN_STATUS_OK.
*
*/
XnStatus GetTopLeftStatus() const;
XnStatus GetTopRightStatus() const;
XnStatus GetBottomLeftStatus() const;
XnStatus GetBottomRightStatus() const;
protected:
XnStatus GetCandidates(const XnVDepthMap& dmObject, const XnVPoint& ptDivider,
XnVPoint& ptXLeft, XnVPoint& ptYLeft, XnVPoint& ptZLeftFront, XnVPoint& ptZLeftBack,
XnVPoint& ptXRight, XnVPoint& ptYRight, XnVPoint& ptZRightFront, XnVPoint& ptZRightBack,
XnInt32 nYStart, XnInt32 nYEnd, XnInt32 nMultFactor, XnInt32 nAddFactor);
bool CheckRelevance(const XnVDepthMap& dmMap, XnUInt16 nX, XnUInt16 nY) const;
XnUInt16 m_nXFromMiddle;
XnUInt16 m_nBoxSide;
XnUInt32 m_nBoxThreshold;
enum
{
XN_HS_TOP_LEFT,
XN_HS_TOP_RIGHT,
XN_HS_BOTTOM_LEFT,
XN_HS_BOTTOM_RIGHT,
};
XnStatus m_SpecificStatus[4];
XnBool m_bTop;
};
#endif //_XNV_HUMAN_STRETCH_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVImageMap.h 0000664 0000000 0000000 00000007141 11701035512 0021066 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_IMAGE_MAP_H_
#define _XNV_IMAGE_MAP_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVImageMatrix.h"
#include "XnVStream.h"
#include "XnVPixelStreamData.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This object holds the image using XnVImageMatrix.
* A XnVImageMap instance should be initialized either by XnVStreamDetails or
* by another XnVImageMap instance using the Clone method.
*/
class XN_EE_CORE_API XnVImageMap : public XnVPixelStreamData
{
public:
XnVImageMap(XnVStream* pStream, XnBool bIsLive = FALSE, XnBool bWaitForDataUpdate = FALSE);
XnVImageMap();
~XnVImageMap();
typedef enum
{
XNV_IMAGE_RED,
XNV_IMAGE_GREEN,
XNV_IMAGE_BLUE,
} XnVImageComponent;
XnStatus Initialize(const XnVImageMap& imOther, XnUInt16 nXRes, XnUInt16 nYRes, XnUInt16 nXOffset = 0, XnUInt16 nYOffset = 0);
XnStatus Clone(XnVImageMap& imOther) const;
XnUInt8* Data();
const XnUInt8* Data() const;
XnUInt8 &operator[](XnInt32 nIndex);
const XnUInt8 &operator[](XnInt32 nIndex) const;
XnUInt8& operator()(XnInt32 nX, XnInt32 nY, XnVImageComponent eComponent);
const XnUInt8& operator()(XnInt32 nX, XnInt32 nY, XnVImageComponent eComponent) const;
void Clear();
inline XnUInt8 GetBytesPerPixel() const { return m_nBytesPerPixel; }
inline XnOutputFormats GetOutputFormat() const { return m_OutputFormat; }
XnStatus CopyFrom(const XnVImageMap& im, XnUInt64 nTimestamp = 0);
protected:
XnStatus ReadPropertiesFromStream();
private:
XN_3_6_PUBLIC_MEMBER XnVImageMatrix m_pImage;
XN_3_6_PUBLIC_MEMBER XnUInt32 m_ImageFormat;
XN_3_6_PUBLIC_MEMBER XnOutputFormats m_OutputFormat;
XN_3_6_PUBLIC_MEMBER XnUInt8 m_nBytesPerPixel;
};
#endif //_XNV_IMAGE_MAP_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVImageMatrix.h 0000664 0000000 0000000 00000006117 11701035512 0021617 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_IMAGE_MATRIX_H_
#define _XNV_IMAGE_MATRIX_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVMatrix.h"
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This object is a specific XnVMatrix, which holds XnUInt8, and should be used
* for holding images. It holds 3 entries for each pixel - for RGB.
* It is used by XnVImageMap.
*/
class XN_EE_CORE_API XnVImageMatrix : public XnVMatrix
{
public:
XnVImageMatrix(XnUInt8* pBuffer, XnUInt16 nXRes, XnUInt16 nYRes, XnUInt16 nBPP) :
XnVMatrix(pBuffer, nBPP * nXRes, nYRes, sizeof(XnUInt8))
{}
XnVImageMatrix(XnUInt16 nXRes, XnUInt16 nYRes, XnUInt16 nBPP) :
XnVMatrix(nBPP * nXRes, nYRes, sizeof(XnUInt8))
{}
operator XnUInt8*()
{
return (XnUInt8*)Data();
}
operator const XnUInt8*() const
{
return (const XnUInt8*)Data();
}
inline const XnUInt8& operator[](XnInt32 nIndex) const
{
return ((const XnUInt8*)Data())[nIndex];
}
inline XnUInt8& operator[](XnInt32 nIndex)
{
return ((XnUInt8*)Data())[nIndex];
}
inline void Clear()
{
xnOSMemSet(Data(), 0, m_nXRes*m_nYRes * sizeof(XnDepthPixel));
}
};
#endif //_XNV_IMAGE_MATRIX_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVInitStreamProperties.h 0000664 0000000 0000000 00000011217 11701035512 0023541 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_INIT_STREAM_PROPERTIES_H
#define _XNV_INIT_STREAM_PROPERTIES_H
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include "XnVStatus.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This class is used to initialize a XnVDevice to the correct configuration.
* Default values when used are:
* All streams are off, and configuration is to be done.
*/
class XN_3_6_API XN_EE_CORE_API XnVInitStreamProperties
{
public:
XnVInitStreamProperties();
~XnVInitStreamProperties();
/**
* Add a stream to the configuration.
* Possible stream names can be found in XnStreamParams.h
*
* @param [in] strStream Name of the stream.
*/
XnStatus AddStream(const XnChar* strStream);
/**
* Remove a stream from the configuration.
* Possible stream names can be found in XnStreamParams.h
*
* @param [in] strStream Name of the stream
*/
XnStatus RemoveStream(const XnChar* strStream);
/**
* Check if stream was added to configuration.
* Possible stream names can be found in XnStreamParams.h
*
* @param [in] strStream Name of the stream
*/
XnBool IsStream(const XnChar* strStream) const;
/**
* Add a property to the stream configuration.
* Possible stream and property names can be found in XnStreamParams.h
*
* @param [in] strStream Name of the stream
* @param [in] strProperty Name of the property
* @param [in] nValue Value of the property
*/
XnStatus AddProperty(const XnChar* strStream, const XnChar* strProperty, XnUInt32 nValue);
/**
* Remove a property from the stream configuration.
* Possible stream and property names can be found in XnStreamParams.h
*
* @param [in] strStream Name of the stream
* @param [in] strProperty Name of the property
*/
XnStatus RemoveProperty(const XnChar* strStream, const XnChar* strProperty);
/**
* Get a property from the stream configuration.
* Possible stream and property names can be found in XnStreamParams.h
*
* @param [in] strStream Name of the stream
* @param [in] strProperty Name of the property
* @param [out] nValue Value of the property
*/
XnStatus GetProperty(const XnChar* strStream, const XnChar* strProperty, XnUInt32& nValue) const;
/**
* Check if a property was added to the stream configuration.
* Possible stream and property names can be found in XnStreamParams.h
*
* @param [in] strStream Name of the stream
* @param [in] strProperty Name of the property
*/
XnBool IsProperty(const XnChar* strStream, const XnChar* strProperty) const;
/**
* Set whether or not to configure the device at all.
*
* @param [in] bConfigure Should configure?
*/
void SetConfigure(XnBool bConfigure);
XnBool GetConfigure() const;
protected:
void* m_pInternal;
};
#endif // _XNV_INIT_STREAM_PROPERTIES_H
Sensor-Stable-5.1.0.41/Include/XnEE/XnVLabelMatrix.h 0000664 0000000 0000000 00000006621 11701035512 0021614 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_LABEL_MATRIX_H_
#define _XNV_LABEL_MATRIX_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVObject.h"
#include "XnVMatrix.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* XnVLabelMatrix is a matrix of XnVObject::XnVLabel.
* It is usually coupled with a XnVDepthMap object of the same resolution,
* and is filled by XnVConnectedComponentDetector.
* A label at a certain (x,y) position (or at [index] position)
* is the label of the pixel at the same position in the matching XnVDepthMap.
*/
class XN_EE_FW_API XnVLabelMatrix : public XnVMatrix
{
public:
XnVLabelMatrix(XnDepthPixel* pBuffer, XnUInt16 nXRes, XnUInt16 nYRes) :
XnVMatrix(pBuffer, nXRes, nYRes, sizeof(XnVObject::XnVLabel))
{}
XnVLabelMatrix(XnUInt16 nXRes, XnUInt16 nYRes) :
XnVMatrix(nXRes, nYRes, sizeof(XnVObject::XnVLabel))
{}
XnVLabelMatrix() :
XnVMatrix(0, 0, sizeof(XnVObject::XnVLabel))
{}
inline XnVObject::XnVLabel& operator[](XnInt32 nIndex)
{
return ((XnVObject::XnVLabel*)Data())[nIndex];
}
inline const XnVObject::XnVLabel& operator[](XnInt32 nIndex) const
{
return ((XnVObject::XnVLabel*)Data())[nIndex];
}
inline const XnVObject::XnVLabel& operator()(XnInt32 nX, XnInt32 nY) const
{
return (*this)[nY*m_nXRes+nX];
}
inline XnVObject::XnVLabel& operator()(XnInt32 nX, XnInt32 nY)
{
return (*this)[nY*m_nXRes+nX];
}
inline void Clear()
{
xnOSMemSet(Data(), 0, m_nXRes*m_nYRes*sizeof(XnVObject::XnVLabel));
}
};
#endif //_XNV_LABEL_MATRIX_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVLabelPruner.h 0000664 0000000 0000000 00000005407 11701035512 0021624 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_LABEL_PRUNER_H_
#define _XNV_LABEL_PRUNER_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVLabeledObject.h"
#include "XnVDepthMap.h"
#include "XnVLabelMatrix.h"
//---------------------------------------------------------------------------
// Types
//-----------------------------------------------------------------------
/**
* This algorithm removes from the input XnVDepthMap the values where the matching XnVLabelMatrix has
* a value different from the input XnVObject::XnVLabel.
*/
class XN_EE_FW_API XnVLabelPruner
{
public:
/**
* Set NoSample value in all the places in the depth map that correspond with a label other than
* the desired one.
*
* @param [in,out] dmMap The depth map to be pruned
* @param [in] lmLabels Label per pixel
* @param [in] nLabel The label we want to keep
*/
XnStatus Run(XnVDepthMap& dmMap, const XnVLabelMatrix& lmLabels, const XnVObject::XnVLabel nLabel);
XnStatus Run(XnVLabeledObject& lo);
};
#endif // _XNV_LABEL_PRUNER_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVLabeledObject.h 0000664 0000000 0000000 00000005577 11701035512 0022100 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_LABELED_OBJECT_H_
#define _XNV_LABELED_OBJECT_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVRealObject.h"
#include "XnVLabelMatrix.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a real object that holds a label matrix with it. In effect, it creates a mask over the depth map
* and allows categorization of it using labels.
* As a Real Object, the LabeledObject holds a label (actually, as a XnVObject) and a pointer to XnVDepthMap.
*/
class XN_EE_FW_API XnVLabeledObject : public XnVRealObject
{
public:
XnVLabeledObject() :
XnVRealObject(NULL)
{}
const XnVLabelMatrix* GetLabelMatrix() const
{return m_pLM;}
void SetLabelMatrix(XnVLabelMatrix* pLM)
{m_pLM = pLM;}
virtual XnDepthPixel GetAt(XnUInt32 nPos) const
{
if (((XnVObject::XnVLabel*)m_pLM->Data())[nPos] == m_nID)
return m_pdmDepthMap->Data()[nPos];
return m_pdmDepthMap->GetNoSampleValue();
}
protected:
XnVLabelMatrix* m_pLM;
};
#endif // _XNV_LABELED_OBJECT_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVMathCommon.h 0000664 0000000 0000000 00000005776 11701035512 0021464 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_MATH_COMMON_H_
#define _XNV_MATH_COMMON_H_
#include
#include
namespace XnVMathCommon
{
inline void Exchange(XnFloat& a, XnFloat& b)
{
XnFloat c = a;
a = b;
b = c;
}
inline void ExchangeSort(XnFloat& a, XnFloat& b)
{
if (a > b)
Exchange(a, b);
}
inline void ExchangeSort(XnFloat& a, XnFloat& b, XnFloat& c)
{
if (a > b)
Exchange(a, b);
if (b > c)
Exchange(b, c);
if (a > b)
Exchange(a, b);
}
inline XnFloat Sqr(XnFloat a)
{
return a*a;
}
inline XnFloat Max(XnFloat a, XnFloat b)
{
return (a > b ? a : b);
}
inline XnFloat Min(XnFloat a, XnFloat b)
{
return (a < b ? a : b);
}
inline XnFloat MaxAbs(XnFloat a, XnFloat b)
{
return Max(fabs(a), fabs(b));
}
inline XnFloat MinAbs(XnFloat a, XnFloat b)
{
return Min(fabs(a), fabs(b));
}
inline XnUInt16 ArgMax(XnFloat a, XnFloat b)
{
return (a > b ? 0 : 1);
}
inline XnUInt16 ArgMax(XnFloat a, XnFloat b, XnFloat c)
{
return (a > b ? (a > c ? 0 : 2) : (b > c ? 1 : 2));
}
inline XnUInt16 ArgMin(XnFloat a, XnFloat b)
{
return ArgMax(-a, -b);
}
inline XnUInt16 ArgMin(XnFloat a, XnFloat b, XnFloat c)
{
return ArgMax(-a, -b, -c);
}
const XnFloat PI=3.14159265f;
const XnFloat HALF_PI=(PI/2);
inline XnBool IsZero(XnFloat f, XnFloat fTolerance)
{
return fabs(f) < fTolerance;
}
}
#endif //_XNV_MATH_COMMON_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVMatrix.h 0000664 0000000 0000000 00000010637 11701035512 0020656 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_MATRIX_H_
#define _XNV_MATRIX_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVContainer.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a general 2-Dimension Container, and is implemented over XnVContainer.
* It can either be initialized by the size it should be in, or by a buffer already
* allocated outside.
* All functionalities that change the size of the matrix are disabled if
* the buffer was supplied by the user.
*/
class XN_EE_CORE_API XnVMatrix
{
public:
/**
* Create a new matrix, initializing the buffer it will use.
*
* @param [in] pBuffer The buffer in which to implement the container
* @param [in] nXRes The X-axis resolution of the matrix
* @param [in] nYRes The Y-axis resolution of the matrix
* @param [in] nElSize The size of each element
*/
XnVMatrix(void* pBuffer, XnUInt16 nXRes, XnUInt16 nYRes, XnUInt16 nElSize);
/**
* Create a new matrix, using a user-supplied buffer.
*
* @param [in] nXRes The X-axis resolution of the matrix
* @param [in] nYRes The Y-axis resolution of the matrix
* @param [in] nElSize The size of each element
*/
XnVMatrix(XnUInt16 nXRes, XnUInt16 nYRes, XnUInt16 nElSize);
virtual ~XnVMatrix()
{}
inline XnStatus ReAdjust(XnUInt16 nXRes, XnUInt16 nYRes)
{
XnStatus rc = m_vData.ReAdjust(nXRes * nYRes);
if (rc != XN_STATUS_OK)
return rc;
m_nXRes = nXRes;
m_nYRes = nYRes;
return rc;
}
inline XnStatus ReAdjust(void* pData, XnUInt16 nXRes, XnUInt16 nYRes)
{
m_nXRes = nXRes;
m_nYRes = nYRes;
return m_vData.ReAdjust(pData, nXRes*nYRes);
}
inline void* GetAt(XnUInt16 nX, XnUInt16 nY)
{
return m_vData.GetAt(nY * m_nXRes + nX);
}
inline void* GetAt(XnUInt16 nX, XnUInt16 nY) const
{
return m_vData.GetAt(nY * m_nXRes + nX);
}
inline void* GetAt(XnUInt32 nIndex)
{
return m_vData.GetAt(nIndex);
}
inline void* GetAt(XnUInt32 nIndex) const
{
return m_vData.GetAt(nIndex);
}
inline void* GetNext(void* pPrevious) const
{
return m_vData.GetNext(pPrevious);
}
inline XnUInt16 GetXRes() const
{
return m_nXRes;
}
inline XnUInt16 GetYRes() const
{
return m_nYRes;
}
inline void* Data()
{
return m_vData.Data();
}
inline const void* Data() const
{
return m_vData.Data();
}
virtual void Clear();
virtual XnStatus Clone(XnVMatrix& other) const;
//protected:
XnUInt16 m_nXRes, m_nYRes;
XnVContainer m_vData;
private:
XnVMatrix& operator=(const XnVMatrix& other);
};
#endif //_XNV_MATRIX_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVMatrix3X3.h 0000664 0000000 0000000 00000060134 11701035512 0021151 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_MATRIX3X3_H_
#define _XNV_MATRIX3X3_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_EE_FW_API XnVMatrix3X3
{
public:
inline XnVMatrix3X3();
inline XnVMatrix3X3(const XnVMatrix3X3& m33Other);
inline XnVMatrix3X3(const XnV3DVector& v3Col0, const XnV3DVector& v3Col1, const XnV3DVector& v3Col2);
inline XnVMatrix3X3(XnFloat f00, XnFloat f01, XnFloat f02,
XnFloat f10, XnFloat f11, XnFloat f12,
XnFloat f20, XnFloat f21, XnFloat f22);
inline explicit XnVMatrix3X3(XnFloat* pf);
inline XnVMatrix3X3& operator=(const XnVMatrix3X3& m33Other);
inline XnFloat operator()(XnUInt32 i, XnUInt32 j) const;
inline XnFloat& operator()(XnUInt32 i, XnUInt32 j);
inline XnFloat operator[](XnUInt32 i) const;
inline XnFloat& operator[](XnUInt32 i);
inline XnVMatrix3X3& SetZero();
inline XnVMatrix3X3& Set(const XnVMatrix3X3& m33Other);
inline XnVMatrix3X3& Set(const XnV3DVector& v3Col0, const XnV3DVector& v3Col1, const XnV3DVector& v3Col2);
inline XnVMatrix3X3& Set(XnFloat f00, XnFloat f01, XnFloat f02,
XnFloat f10, XnFloat f11, XnFloat f12,
XnFloat f20, XnFloat f21, XnFloat f22);
inline XnVMatrix3X3& Set(XnFloat* pf);
inline XnVMatrix3X3& SetRow(XnUInt32 nRow, const XnV3DVector& v3Row);
inline XnVMatrix3X3& SetColumn(XnUInt32 nColumn, const XnV3DVector& v3Column);
inline void GetRow(XnUInt32 nRow, XnV3DVector& v3Row) const;
inline void GetColumn(XnUInt32 nColumn, XnV3DVector& v3Column) const;
// Comparison
inline XnBool operator==(const XnVMatrix3X3& m33Rhs) const;
inline XnBool operator!=(const XnVMatrix3X3& m33Rhs) const;
inline XnBool Equal(const XnVMatrix3X3& m33Other, XnFloat fTolerance = 1e-5f) const;
inline XnVMatrix3X3& Negate(const XnVMatrix3X3& m33Other);
inline XnVMatrix3X3& Negate();
inline XnVMatrix3X3 operator-() const;
inline XnVMatrix3X3 operator+(XnFloat f) const;
inline XnVMatrix3X3& operator+=(XnFloat f);
inline XnVMatrix3X3& Add(const XnVMatrix3X3& m33Mat, XnFloat f);
inline XnVMatrix3X3 operator+(const XnVMatrix3X3& m33Other) const;
inline XnVMatrix3X3& operator+=(const XnVMatrix3X3& m33Other);
inline XnVMatrix3X3& Add(const XnVMatrix3X3& m33Mat1, const XnVMatrix3X3& m33Mat2);
inline XnVMatrix3X3 operator-(XnFloat f) const;
inline XnVMatrix3X3& operator-=(XnFloat f);
inline XnVMatrix3X3& Subtract(const XnVMatrix3X3& m33Mat, XnFloat f);
inline XnVMatrix3X3 operator-(const XnVMatrix3X3& m33Other) const;
inline XnVMatrix3X3& operator-=(const XnVMatrix3X3& m33Other);
inline XnVMatrix3X3& Subtract(const XnVMatrix3X3& m33Mat1, const XnVMatrix3X3& m33Mat2);
inline XnVMatrix3X3 operator/(XnFloat f) const;
inline XnVMatrix3X3& operator/=(XnFloat f);
inline XnVMatrix3X3& Divide(const XnVMatrix3X3& m33Mat, XnFloat f);
inline XnVMatrix3X3 operator*(XnFloat f) const;
inline XnVMatrix3X3& operator*=(XnFloat f);
inline XnVMatrix3X3& Multiply(const XnVMatrix3X3& m33Mat, XnFloat f);
friend inline XnVMatrix3X3 operator*(XnFloat f, const XnVMatrix3X3& m33Mat);
inline XnVMatrix3X3& Multiply(XnFloat f, const XnVMatrix3X3& m33Mat);
inline XnVMatrix3X3 operator*(const XnVMatrix3X3& m33Other) const;
inline XnVMatrix3X3& operator*=(const XnVMatrix3X3& m33Other);
inline XnVMatrix3X3& Multiply(const XnVMatrix3X3& m33Mat1, const XnVMatrix3X3& m33Mat2);
inline XnV3DVector operator*(const XnV3DVector& v3Vec) const;
inline void Multiply(const XnV3DVector& v3Src, XnV3DVector& v3Dst) const;
inline XnFloat InnerProduct(const XnV3DVector& v3Vec1, const XnV3DVector& v3Vec2) const;
inline XnVMatrix3X3& SetOuterProduct(const XnV3DVector& v3Vec);
inline XnVMatrix3X3& SetOuterProduct(const XnV3DVector& v3Vec1, const XnV3DVector& v3Vec2);
inline XnFloat Determinant() const;
inline XnFloat Trace() const;
inline void SetDiagonal(const XnV3DVector& v3Diag);
inline void GetDiagonal(XnV3DVector& v3Diag) const;
inline XnVMatrix3X3 operator~() const;
inline XnVMatrix3X3& Transpose();
inline XnVMatrix3X3& Transpose(const XnVMatrix3X3& m33Other);
inline void CofactorMatrix(XnVMatrix3X3& m33CoMat) const;
inline XnStatus LargestColumnNormalized(XnV3DVector& v3Col) const;
inline XnVMatrix3X3& Inverse(const XnVMatrix3X3& m33Other);
inline XnVMatrix3X3& SetIdentity();
// Radians
inline XnVMatrix3X3& SetXRotation(XnFloat fXAngle);
inline XnVMatrix3X3& SetYRotation(XnFloat fYAngle);
inline XnVMatrix3X3& SetZRotation(XnFloat fZAngle);
inline XnStatus GetSymmetricEigenValues(XnV3DVector& v3Values) const;
inline XnStatus GetSymmetricEigenVectors(const XnV3DVector &v3Lambda,
XnVMatrix3X3& m3Vectors, XnFloat fTolerance=1e-8f) const;
inline XnStatus SolveSymmetricEigenProblem(XnV3DVector& v3EigenValues, XnVMatrix3X3& m33EigenVectors, XnFloat fTolerance=1e-4f) const;
inline XnBool IsSymmetric(XnFloat fTolerance = 1e-5f) const;
protected:
XnFloat m_fElements[9];
};
XnVMatrix3X3::XnVMatrix3X3()
{
SetZero();
}
XnVMatrix3X3::XnVMatrix3X3(const XnVMatrix3X3& m33Other)
{
Set(m33Other);
}
XnVMatrix3X3::XnVMatrix3X3(const XnV3DVector& v3Col0, const XnV3DVector& v3Col1, const XnV3DVector& v3Col2)
{
Set(v3Col0, v3Col1, v3Col2);
}
XnVMatrix3X3::XnVMatrix3X3(XnFloat f00, XnFloat f01, XnFloat f02,
XnFloat f10, XnFloat f11, XnFloat f12,
XnFloat f20, XnFloat f21, XnFloat f22)
{
Set(f00, f01, f02,
f10, f11, f12,
f20, f21, f22);
}
XnVMatrix3X3::XnVMatrix3X3(XnFloat* pf)
{
Set(pf);
}
XnVMatrix3X3& XnVMatrix3X3::operator=(const XnVMatrix3X3& m33Other)
{
return Set(m33Other);
}
XnFloat XnVMatrix3X3::operator()(XnUInt32 i, XnUInt32 j) const
{
return m_fElements[i * 3 + j];
}
XnFloat& XnVMatrix3X3::operator()(XnUInt32 i, XnUInt32 j)
{
return m_fElements[i * 3 + j];
}
XnFloat XnVMatrix3X3::operator[](XnUInt32 i) const
{
return m_fElements[i];
}
XnFloat& XnVMatrix3X3::operator[](XnUInt32 i)
{
return m_fElements[i];
}
XnVMatrix3X3& XnVMatrix3X3::SetZero()
{
return Set (0, 0, 0,
0, 0, 0,
0, 0, 0);
}
XnVMatrix3X3& XnVMatrix3X3::Set(const XnVMatrix3X3& m33Other)
{
return Set (m33Other(0, 0), m33Other(0, 1), m33Other(0, 2),
m33Other(1, 0), m33Other(1, 1), m33Other(1, 2),
m33Other(2, 0), m33Other(2, 1), m33Other(2, 2));
}
XnVMatrix3X3& XnVMatrix3X3::Set(const XnV3DVector& v3Col0, const XnV3DVector& v3Col1, const XnV3DVector& v3Col2)
{
return Set (v3Col0[0], v3Col1[0], v3Col2[0],
v3Col0[1], v3Col1[1], v3Col2[1],
v3Col0[2], v3Col1[2], v3Col2[2]);
}
XnVMatrix3X3& XnVMatrix3X3::Set(XnFloat f00, XnFloat f01, XnFloat f02,
XnFloat f10, XnFloat f11, XnFloat f12,
XnFloat f20, XnFloat f21, XnFloat f22)
{
m_fElements[0] = f00; m_fElements[1] = f01; m_fElements[2] = f02;
m_fElements[3] = f10; m_fElements[4] = f11; m_fElements[5] = f12;
m_fElements[6] = f20; m_fElements[7] = f21; m_fElements[8] = f22;
return *this;
}
XnVMatrix3X3& XnVMatrix3X3::Set(XnFloat* pf)
{
xnOSMemCopy(m_fElements, pf, 9*sizeof(XnFloat));
return *this;
}
XnVMatrix3X3& XnVMatrix3X3::SetRow(XnUInt32 nRow, const XnV3DVector& v3Row)
{
m_fElements[nRow * 3 ] = v3Row[0];
m_fElements[nRow * 3 + 1] = v3Row[1];
m_fElements[nRow * 3 + 2] = v3Row[2];
return *this;
}
XnVMatrix3X3& XnVMatrix3X3::SetColumn(XnUInt32 nColumn, const XnV3DVector& v3Column)
{
m_fElements[ nColumn] = v3Column[0];
m_fElements[1 * 3 + nColumn] = v3Column[1];
m_fElements[2 * 3 + nColumn] = v3Column[2];
return *this;
}
void XnVMatrix3X3::GetRow(XnUInt32 nRow, XnV3DVector& v3Row) const
{
v3Row.Set(m_fElements[nRow*3], m_fElements[nRow*3+1], m_fElements[nRow*3+2]);
}
void XnVMatrix3X3::GetColumn(XnUInt32 nColumn, XnV3DVector& v3Column) const
{
v3Column.Set(m_fElements[0*3+nColumn], m_fElements[1*3+nColumn], m_fElements[2*3+nColumn]);
}
XnBool XnVMatrix3X3::IsSymmetric(XnFloat fTolerance) const
{
if (fabs((*this)(0,1) - (*this)(1,0)) > fTolerance)
return false;
if (fabs((*this)(0,2) - (*this)(2,0)) > fTolerance)
return false;
if (fabs((*this)(1,2) - (*this)(2,1)) > fTolerance)
return false;
return true;
}
// Comparison
inline XnBool XnVMatrix3X3::operator==(const XnVMatrix3X3& m33Rhs) const
{
return Equal(m33Rhs, 1e-5f);
}
inline XnBool XnVMatrix3X3::operator!=(const XnVMatrix3X3& m33Rhs) const
{
return !Equal(m33Rhs, 1e-5f);
}
inline XnBool XnVMatrix3X3::Equal(const XnVMatrix3X3& m33Other, XnFloat fTolerance) const
{
for (XnUInt32 x = 0; x < 3; x++)
for (XnUInt32 y = 0; y < 3; y++)
if (fabs((*this)(x, y)-m33Other(x, y)) > fTolerance)
return false;
return true;
}
XnVMatrix3X3& XnVMatrix3X3::Negate(const XnVMatrix3X3& m33Other)
{
return Set (-m33Other(0, 0), -m33Other(0, 1), -m33Other(0, 2),
-m33Other(1, 0), -m33Other(1, 1), -m33Other(1, 2),
-m33Other(2, 0), -m33Other(2, 1), -m33Other(2, 2));
}
XnVMatrix3X3& XnVMatrix3X3::Negate()
{
return *this *= -1;
}
XnVMatrix3X3 XnVMatrix3X3::operator-() const
{
return *this * -1;
}
XnVMatrix3X3 XnVMatrix3X3::operator+(XnFloat f) const
{
XnVMatrix3X3 m33Result;
m33Result.Add(*this, f);
return m33Result;
}
XnVMatrix3X3& XnVMatrix3X3::operator+=(XnFloat f)
{
return Add(*this, f);
}
XnVMatrix3X3& XnVMatrix3X3::Add(const XnVMatrix3X3& m33Mat, XnFloat f)
{
return Set( m33Mat(0, 0) + f, m33Mat(0, 1) + f, m33Mat(0, 2) + f,
m33Mat(1, 0) + f, m33Mat(1, 1) + f, m33Mat(1, 2) + f,
m33Mat(2, 0) + f, m33Mat(2, 1) + f, m33Mat(2, 2) + f);
}
XnVMatrix3X3 XnVMatrix3X3::operator+(const XnVMatrix3X3& m33Other) const
{
XnVMatrix3X3 m33Result;
m33Result.Add(*this, m33Other);
return m33Result;
}
XnVMatrix3X3& XnVMatrix3X3::operator+=(const XnVMatrix3X3& m33Other)
{
return Add(*this, m33Other);
}
XnVMatrix3X3& XnVMatrix3X3::Add(const XnVMatrix3X3& m33Mat1, const XnVMatrix3X3& m33Mat2)
{
return Set( m33Mat1.m_fElements[0] + m33Mat2.m_fElements[0],
m33Mat1.m_fElements[1] + m33Mat2.m_fElements[1],
m33Mat1.m_fElements[2] + m33Mat2.m_fElements[2],
m33Mat1.m_fElements[3] + m33Mat2.m_fElements[3],
m33Mat1.m_fElements[4] + m33Mat2.m_fElements[4],
m33Mat1.m_fElements[5] + m33Mat2.m_fElements[5],
m33Mat1.m_fElements[6] + m33Mat2.m_fElements[6],
m33Mat1.m_fElements[7] + m33Mat2.m_fElements[7],
m33Mat1.m_fElements[8] + m33Mat2.m_fElements[8]);
}
XnVMatrix3X3 XnVMatrix3X3::operator-(XnFloat f) const
{
XnVMatrix3X3 m33Result;
m33Result.Subtract(*this, f);
return m33Result;
}
XnVMatrix3X3& XnVMatrix3X3::operator-=(XnFloat f)
{
return Subtract(*this, f);
}
XnVMatrix3X3& XnVMatrix3X3::Subtract(const XnVMatrix3X3& m33Mat, XnFloat f)
{
return Set( m33Mat.m_fElements[0] - f, m33Mat.m_fElements[1] - f, m33Mat.m_fElements[2] - f,
m33Mat.m_fElements[3] - f, m33Mat.m_fElements[4] - f, m33Mat.m_fElements[5] - f,
m33Mat.m_fElements[6] - f, m33Mat.m_fElements[7] - f, m33Mat.m_fElements[8] - f);
}
XnVMatrix3X3 XnVMatrix3X3::operator-(const XnVMatrix3X3& m33Other) const
{
XnVMatrix3X3 m33Result;
m33Result.Subtract(*this, m33Other);
return m33Result;
}
XnVMatrix3X3& XnVMatrix3X3::operator-=(const XnVMatrix3X3& m33Other)
{
return Subtract(*this, m33Other);
}
XnVMatrix3X3& XnVMatrix3X3::Subtract(const XnVMatrix3X3& m33Mat1, const XnVMatrix3X3& m33Mat2)
{
return Set( m33Mat1.m_fElements[0] - m33Mat2.m_fElements[0],
m33Mat1.m_fElements[1] - m33Mat2.m_fElements[1],
m33Mat1.m_fElements[2] - m33Mat2.m_fElements[2],
m33Mat1.m_fElements[3] - m33Mat2.m_fElements[3],
m33Mat1.m_fElements[4] - m33Mat2.m_fElements[4],
m33Mat1.m_fElements[5] - m33Mat2.m_fElements[5],
m33Mat1.m_fElements[6] - m33Mat2.m_fElements[6],
m33Mat1.m_fElements[7] - m33Mat2.m_fElements[7],
m33Mat1.m_fElements[8] - m33Mat2.m_fElements[8]);
}
XnVMatrix3X3 XnVMatrix3X3::operator/(XnFloat f) const
{
XnVMatrix3X3 m33Result;
m33Result.Divide(*this, f);
return m33Result;
}
XnVMatrix3X3& XnVMatrix3X3::operator/=(XnFloat f)
{
return Divide(*this, f);
}
XnVMatrix3X3& XnVMatrix3X3::Divide(const XnVMatrix3X3& m33Mat, XnFloat f)
{
return Set( m33Mat.m_fElements[0] / f, m33Mat.m_fElements[1] / f, m33Mat.m_fElements[2] / f,
m33Mat.m_fElements[3] / f, m33Mat.m_fElements[4] / f, m33Mat.m_fElements[5] / f,
m33Mat.m_fElements[6] / f, m33Mat.m_fElements[7] / f, m33Mat.m_fElements[8] / f);
}
XnVMatrix3X3 XnVMatrix3X3::operator*(XnFloat f) const
{
XnVMatrix3X3 m33Result;
m33Result.Multiply(*this, f);
return m33Result;
}
XnVMatrix3X3& XnVMatrix3X3::operator*=(XnFloat f)
{
return Multiply(*this, f);
}
XnVMatrix3X3& XnVMatrix3X3::Multiply(const XnVMatrix3X3& m33Mat, XnFloat f)
{
return Set( m33Mat.m_fElements[0] * f, m33Mat.m_fElements[1] * f, m33Mat.m_fElements[2] * f,
m33Mat.m_fElements[3] * f, m33Mat.m_fElements[4] * f, m33Mat.m_fElements[5] * f,
m33Mat.m_fElements[6] * f, m33Mat.m_fElements[7] * f, m33Mat.m_fElements[8] * f);
}
XnVMatrix3X3 operator*(XnFloat f, const XnVMatrix3X3& m33Mat)
{
XnVMatrix3X3 m33Result;
m33Result.Multiply(f, m33Mat);
return m33Result;
}
XnVMatrix3X3& XnVMatrix3X3::Multiply(XnFloat f, const XnVMatrix3X3& m33Mat)
{
return Set( f * m33Mat.m_fElements[0], f * m33Mat.m_fElements[1], f * m33Mat.m_fElements[2],
f * m33Mat.m_fElements[3], f * m33Mat.m_fElements[4], f * m33Mat.m_fElements[5],
f * m33Mat.m_fElements[6], f * m33Mat.m_fElements[7], f * m33Mat.m_fElements[8]);
}
XnVMatrix3X3 XnVMatrix3X3::operator*(const XnVMatrix3X3& m33Other) const
{
XnVMatrix3X3 m33Result;
m33Result.Multiply(*this, m33Other);
return m33Result;
}
XnVMatrix3X3& XnVMatrix3X3::operator*=(const XnVMatrix3X3& m33Other)
{
return Multiply(*this, m33Other);
}
XnVMatrix3X3& XnVMatrix3X3::Multiply(const XnVMatrix3X3& m33Mat1, const XnVMatrix3X3& m33Mat2)
{
XnFloat fNewVals[9] = {0};
for(XnUInt32 i = 0; i < 3; i++)
for(XnUInt32 j = 0; j < 3; j++)
for(XnUInt32 k = 0; k < 3; k++)
fNewVals[i * 3 + j] += m33Mat1(i, k) * m33Mat2(k, j);
return Set(fNewVals);
}
XnV3DVector XnVMatrix3X3::operator*(const XnV3DVector& v3Vec) const
{
XnV3DVector m33Result;
Multiply(v3Vec, m33Result);
return m33Result;
}
void XnVMatrix3X3::Multiply(const XnV3DVector& v3Src, XnV3DVector& v3Dst) const
{
v3Dst.Set( m_fElements[0] * v3Src.X() + m_fElements[1] * v3Src.Y() + m_fElements[2] * v3Src.Z(),
m_fElements[3] * v3Src.X() + m_fElements[4] * v3Src.Y() + m_fElements[5] * v3Src.Z(),
m_fElements[6] * v3Src.X() + m_fElements[7] * v3Src.Y() + m_fElements[8] * v3Src.Z());
}
// Relevant for symmetric matrices only - make sure!
XnFloat XnVMatrix3X3::InnerProduct(const XnV3DVector& v3Vec1, const XnV3DVector& v3Vec2) const
{
return (v3Vec1.X() * ((*this)(0,0) * v3Vec2.X() + (*this)(0,1) * v3Vec2.Y() + (*this)(0,2) * v3Vec2.Z()) +
v3Vec1.Y() * ((*this)(1,0) * v3Vec2.X() + (*this)(1,1) * v3Vec2.Y() + (*this)(1,2) * v3Vec2.Z()) +
v3Vec1.Z() * ((*this)(2,0) * v3Vec2.X() + (*this)(2,1) * v3Vec2.Y() + (*this)(2,2) * v3Vec2.Z()));
}
XnVMatrix3X3& XnVMatrix3X3::SetOuterProduct(const XnV3DVector& v3Vec1, const XnV3DVector& v3Vec2)
{
return Set( v3Vec1.X() * v3Vec2.X(), v3Vec1.X() * v3Vec2.Y(), v3Vec1.X() * v3Vec2.Z(),
v3Vec1.Y() * v3Vec2.X(), v3Vec1.Y() * v3Vec2.Y(), v3Vec1.Y() * v3Vec2.Z(),
v3Vec1.Z() * v3Vec2.X(), v3Vec1.Z() * v3Vec2.Y(), v3Vec1.Z() * v3Vec2.Z());
}
XnVMatrix3X3& XnVMatrix3X3::SetOuterProduct(const XnV3DVector& v3Vec)
{
return SetOuterProduct(v3Vec, v3Vec);
}
XnFloat XnVMatrix3X3::Determinant() const
{
return m_fElements[0] * m_fElements[4] * m_fElements[8] +
m_fElements[1] * m_fElements[5] * m_fElements[6] +
m_fElements[2] * m_fElements[3] * m_fElements[7] -
m_fElements[2] * m_fElements[4] * m_fElements[6] -
m_fElements[1] * m_fElements[3] * m_fElements[8] -
m_fElements[0] * m_fElements[5] * m_fElements[7];
}
XnFloat XnVMatrix3X3::Trace() const
{
return m_fElements[0] + m_fElements[4] + m_fElements[8];
}
void XnVMatrix3X3::SetDiagonal(const XnV3DVector& v3Diag)
{
Set(v3Diag.X(), m_fElements[1], m_fElements[2],
m_fElements[3], v3Diag.Y(), m_fElements[5],
m_fElements[6], m_fElements[7], v3Diag.Z());
}
void XnVMatrix3X3::GetDiagonal(XnV3DVector& v3Diag) const
{
v3Diag.Set(m_fElements[0], m_fElements[4], m_fElements[8]);
}
XnVMatrix3X3 XnVMatrix3X3::operator~() const // Transpose?
{
XnVMatrix3X3 m33Result;
m33Result.Transpose(*this);
return m33Result;
}
XnVMatrix3X3& XnVMatrix3X3::Transpose()
{
return Transpose(*this);
}
XnVMatrix3X3& XnVMatrix3X3::Transpose(const XnVMatrix3X3& m33Other)
{
return Set( m33Other.m_fElements[0], m33Other.m_fElements[3], m33Other.m_fElements[6],
m33Other.m_fElements[1], m33Other.m_fElements[4], m33Other.m_fElements[7],
m33Other.m_fElements[2], m33Other.m_fElements[5], m33Other.m_fElements[8]);
}
XnVMatrix3X3& XnVMatrix3X3::Inverse(const XnVMatrix3X3& m33Other)
{
XnVMatrix3X3 cm;
(~m33Other).CofactorMatrix(cm);
Divide(cm, m33Other.Determinant());
return *this;
}
XnVMatrix3X3& XnVMatrix3X3::SetIdentity()
{
return Set( 1, 0, 0,
0, 1, 0,
0, 0, 1);
}
XnVMatrix3X3& XnVMatrix3X3::SetXRotation(XnFloat fXAngle)
{
XnFloat s = sin(fXAngle), c = cos(fXAngle);
return Set( 1, 0, 0,
0, c, -s,
0, s, c);
}
XnVMatrix3X3& XnVMatrix3X3::SetYRotation(XnFloat fYAngle)
{
XnFloat s = sin(fYAngle), c = cos(fYAngle);
return Set( c, 0, s,
0, 1, 0,
-s, 0, c);
}
XnVMatrix3X3& XnVMatrix3X3::SetZRotation(XnFloat fZAngle)
{
XnFloat s = sin(fZAngle), c = cos(fZAngle);
return Set( c, -s, 0,
s, c, 0,
0, 0, 1);
}
void XnVMatrix3X3::CofactorMatrix(XnVMatrix3X3& m33CoMat) const
{
m33CoMat.Set(m_fElements[4]*m_fElements[8] - m_fElements[5]*m_fElements[7],
m_fElements[5]*m_fElements[6] - m_fElements[3]*m_fElements[8],
m_fElements[3]*m_fElements[7] - m_fElements[4]*m_fElements[6],
m_fElements[2]*m_fElements[7] - m_fElements[1]*m_fElements[8],
m_fElements[0]*m_fElements[8] - m_fElements[2]*m_fElements[6],
m_fElements[1]*m_fElements[6] - m_fElements[0]*m_fElements[7],
m_fElements[1]*m_fElements[5] - m_fElements[2]*m_fElements[4],
m_fElements[2]*m_fElements[3] - m_fElements[0]*m_fElements[5],
m_fElements[0]*m_fElements[4] - m_fElements[1]*m_fElements[3]);
}
XnStatus XnVMatrix3X3::LargestColumnNormalized(XnV3DVector& v3Col) const
{
XnFloat scales[3] = {
XnVMathCommon::Sqr((*this)(0,0)) + XnVMathCommon::Sqr((*this)(1,0)) + XnVMathCommon::Sqr((*this)(2,0)),
XnVMathCommon::Sqr((*this)(0,1)) + XnVMathCommon::Sqr((*this)(1,1)) + XnVMathCommon::Sqr((*this)(2,1)),
XnVMathCommon::Sqr((*this)(0,2)) + XnVMathCommon::Sqr((*this)(1,2)) + XnVMathCommon::Sqr((*this)(2,2))
};
XnUInt16 i = XnVMathCommon::ArgMax(scales[0], scales[1], scales[2]);
if(scales[i] == 0)
{
return XN_STATUS_EE_ERROR;
}
switch (i)
{
case 0:
v3Col.Set((*this)(0,0), (*this)(1,0), (*this)(2,0));
break;
case 1:
v3Col.Set((*this)(0,1), (*this)(1,1), (*this)(2,1));
break;
case 2:
v3Col.Set((*this)(0,2), (*this)(1,2), (*this)(2,2));
break;
default:
return false;
}
v3Col /= sqrt(scales[i]);
return XN_STATUS_OK;
}
inline XnStatus XnVMatrix3X3::GetSymmetricEigenValues(XnV3DVector& v3Values) const
{
if (!IsSymmetric())
{
return XN_STATUS_EE_MATRIX_NOT_SYMMETRIC;
}
XnFloat m = Trace() / 3.0f;
XnFloat a00 = (*this)(0,0)-m, a11 = (*this)(1,1)-m, a22 = (*this)(2,2)-m;
XnFloat a01_sqr = XnVMathCommon::Sqr((*this)(0,1));
XnFloat a02_sqr = XnVMathCommon::Sqr((*this)(0,2));
XnFloat a12_sqr = XnVMathCommon::Sqr((*this)(1,2));
XnFloat p = (a00*a00+a11*a11+a22*a22 + 2*(a01_sqr+a02_sqr+a12_sqr)) / 6.0f;
XnFloat q = .5f*(a00*(a11*a22-a12_sqr)-a11*a02_sqr-a22*a01_sqr) + (*this)(0,1)*(*this)(0,2)*(*this)(1,2);
XnFloat sqrt_p = sqrt(p), disc = p*p*p-q*q;
XnFloat phi = atan2(sqrt(XnVMathCommon::Max(0.0f,disc)),q) / 3.0f;
XnFloat c=cos(phi) , s=sin(phi);
XnFloat sqrt_p_cos = sqrt_p*c, root_three_sqrt_p_sin = sqrt(3.0f)*sqrt_p*s;
v3Values.Set(m+2*sqrt_p_cos, m-sqrt_p_cos-root_three_sqrt_p_sin, m-sqrt_p_cos+root_three_sqrt_p_sin);
XnVMathCommon::ExchangeSort(v3Values.Z(), v3Values.Y(), v3Values.X());
return XN_STATUS_OK;
}
XnStatus XnVMatrix3X3::GetSymmetricEigenVectors(const XnV3DVector &v3Lambda,
XnVMatrix3X3& m33Vectors,
XnFloat tolerance) const
{
XnVMatrix3X3 id;
id.SetIdentity();
if (!IsSymmetric())
{
return XN_STATUS_EE_MATRIX_NOT_SYMMETRIC;
}
XnFloat fTiny = tolerance * XnVMathCommon::MaxAbs(v3Lambda.X(), v3Lambda.Z());
XnVMatrix3X3 m33CoMat;
if (v3Lambda.X() - v3Lambda.Y() <= fTiny)
{
if (v3Lambda.Y() - v3Lambda.Z() <= fTiny)
{
m33Vectors.SetIdentity();
}
else
{
XnV3DVector v3Vec2, v3Vec1, v3Cross;
((*this)-id*v3Lambda.Z()).CofactorMatrix(m33CoMat);
XnStatus rc = m33CoMat.LargestColumnNormalized(v3Vec2);
if (rc != XN_STATUS_OK)
{
return rc;
}
v3Vec1.UnitOrthogonalVector(v3Vec2);
v3Cross.CrossProduct(v3Vec1, v3Vec2);
m33Vectors.Set(v3Cross, v3Vec1, v3Vec2);
}
}
else if(v3Lambda.Y() - v3Lambda.Z()<=fTiny)
{
XnV3DVector v3Vec0, v3Vec1, v3Cross;
((*this)-id*v3Lambda.X()).CofactorMatrix(m33CoMat);
XnStatus rc = m33CoMat.LargestColumnNormalized(v3Vec0);
if (rc != XN_STATUS_OK)
{
return rc;
}
v3Vec1.UnitOrthogonalVector(v3Vec0);
v3Cross.CrossProduct(v3Vec0, v3Vec1);
m33Vectors.Set(v3Vec0, v3Vec1, v3Cross);
}
else
{
XnV3DVector v3Vec0, v3Cross, v3Vec2;
((*this)-id*v3Lambda.X()).CofactorMatrix(m33CoMat);
XnStatus rc = m33CoMat.LargestColumnNormalized(v3Vec0);
if (rc != XN_STATUS_OK)
{
return rc;
}
((*this)-id*v3Lambda.Z()).CofactorMatrix(m33CoMat);
rc = m33CoMat.LargestColumnNormalized(v3Vec2);
if (rc != XN_STATUS_OK)
{
return rc;
}
v3Cross.CrossProduct(v3Vec2, v3Vec0);
m33Vectors.Set(v3Vec0, v3Cross, v3Vec2);
}
return XN_STATUS_OK;
}
XnStatus XnVMatrix3X3::SolveSymmetricEigenProblem(XnV3DVector& v3EigenValues, XnVMatrix3X3& m33EigenVectors, XnFloat fTolerance) const
{
if (!IsSymmetric())
{
return XN_STATUS_EE_MATRIX_NOT_SYMMETRIC;
}
GetSymmetricEigenValues(v3EigenValues);
GetSymmetricEigenVectors(v3EigenValues, m33EigenVectors, fTolerance);
return XN_STATUS_OK;
}
#endif //_XNV_MATRIX3X3_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVModule.h 0000664 0000000 0000000 00000012565 11701035512 0020641 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_MODULE_H_
#define _XNV_MODULE_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include "XnVStreamContainer.h"
#include "XnVStatus.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* A module represents a number of parameters under the same title.
* Module and Property names are available in XnStreamParams.
*/
class XN_EE_CORE_API XnVModule
{
public:
XnVModule();
XnVModule(const XnVModule& other);
XnVModule& operator=(const XnVModule& other);
virtual ~XnVModule();
/**
* Attach to a certain module in a certain container.
* Module names are
*
* @param [in] pStreamContainer The container (device) to attach
* @param [in] strName Name of the module.
*/
XnStatus Attach(XnVStreamContainer* pStreamContainer, const XnChar* strName);
/**
* Detach from the device.
*/
XnStatus Detach();
/**
* Get a 'sibling module' - another module from the same device.
*
* @param [in] strName Name of the other module
* @param [out] module The other module
*/
XnStatus GetOtherModule(const XnChar* strName, XnVModule& module);
const XnChar* GetName() const;
XnVStreamContainer* GetCreator();
const XnVStreamContainer* GetCreator() const;
/**
* Get a certain property from the module.
*
* @param [in] strProperty Name of the property
* @param [out] nValue Value of the property
*/
XnStatus GetProperty(const XnChar* strProperty, XnUInt64& nValue) const;
XnStatus GetProperty(const XnChar* strProperty, XnDouble& dValue) const;
XnStatus GetProperty(const XnChar* strProperty, XnChar* csValue) const;
XnStatus GetProperty(const XnChar* strProperty, const XnGeneralBuffer& gbValue) const;
XnStatus GetAllProperties(XnVPropertySet& PropertySet);
/**
* Set a certain property to the module.
*
* @param [in] strProperty Name of the property
* @param [in] nValue Value of the property
*/
XnStatus SetProperty(const XnChar* strProperty, XnUInt64 nValue);
XnStatus SetProperty(const XnChar* strProperty, XnDouble fValue);
XnStatus SetProperty(const XnChar* strProperty, const XnChar* strValue);
XnStatus SetProperty(const XnChar* strProperty, const XnGeneralBuffer& gbValue);
XnStatus RegisterForPropertyChangedEvent(const XnChar* strProperty, XnVModulePropertyChangedHandler* pHandler, XnCallbackHandle* phCallback);
XnStatus UnregisterFromPropertyChangedEvent(const XnChar* strProperty, XnCallbackHandle hCallback);
XN_3_6_API XnStatus GetProperty(const XnChar* strProperty, XnUInt8& nValue) const;
XN_3_6_API XnStatus GetProperty(const XnChar* strProperty, XnUInt16& nValue) const;
XN_3_6_API XnStatus GetProperty(const XnChar* strProperty, XnInt32& nValue) const;
XN_3_6_API XnStatus GetProperty(const XnChar* strProperty, XnUInt32& nValue) const;
XN_3_6_API XnStatus GetProperty(const XnChar* strProperty, XnFloat& fValue) const;
XN_3_6_API XnStatus GetProperty(const XnChar* strProperty, void*& pValue) const;
XN_3_6_API XnStatus SetProperty(const XnChar* strProperty, XnUInt8 nValue);
XN_3_6_API XnStatus SetProperty(const XnChar* strProperty, XnUInt16 nValue);
XN_3_6_API XnStatus SetProperty(const XnChar* strProperty, XnInt32 nValue);
XN_3_6_API XnStatus SetProperty(const XnChar* strProperty, XnUInt32 nValue);
XN_3_6_API XnStatus SetProperty(const XnChar* strProperty, XnFloat fValue);
XN_3_6_API XnStatus SetProperty(const XnChar* strProperty, void* pValue);
protected:
XnVStreamContainer* m_pStreamContainer;
XnChar* m_strModule;
XnBool m_bAttached;
};
#endif // XNV_MODULE_H
Sensor-Stable-5.1.0.41/Include/XnEE/XnVObject.h 0000664 0000000 0000000 00000005443 11701035512 0020617 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_OBJECT_H_
#define _XNV_OBJECT_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnV3DVector.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* Any Object in the scene, either inserted by the user or that really exists there
* and can be defined, is an XnVObject.
* There are 2 subclasses of XnVObject: XnVVirtualObject, for any user-created object,
* such as boxes and spheres, and XnVRealObject, for any object that really exist
* in the scene, such as hands, connected components and collision.
*/
class XN_EE_FW_API XnVObject
{
public:
typedef XnUInt16 XnVLabel;
XnVLabel GetID() const {return m_nID;}
void SetID(XnVLabel Label) {m_nID = Label;}
const XnVPoint& GetPoint() const {return m_ptRepresentative;}
void SetPoint(const XnV3DVector& ptPoint) {m_ptRepresentative = ptPoint;}
protected:
XnVLabel m_nID;
XnV3DVector m_ptRepresentative;
};
#endif //_XNV_OBJECT_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVPixelStreamData.h 0000664 0000000 0000000 00000006505 11701035512 0022440 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_V_PIXEL_STREAM_DATA_H__
#define __XN_V_PIXEL_STREAM_DATA_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVStreamData.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_EE_CORE_API XnVPixelStreamData : public XnVStreamData
{
public:
XnVPixelStreamData(XnVStream* pStream, XnBool bIsLive = FALSE, XnBool bWaitForDataUpdate = FALSE);
XnVPixelStreamData(XnUInt16 nXRes = 0, XnUInt16 nYRes = 0);
~XnVPixelStreamData();
XnStatus Initialize(const XnVPixelStreamData& soOther, XnUInt16 nXOffset, XnUInt16 nYOffset, XnUInt16 nXRes, XnUInt16 nYRes);
inline XnUInt16 GetXRes() const { return m_nXRes; }
inline XnUInt16 GetYRes() const { return m_nYRes; }
inline XnUInt16 GetXOffset() const { return m_nXOffset; }
inline XnUInt16 GetYOffset() const { return m_nYOffset; }
inline XnUInt16 GetParentXRes() const { return m_nParentXRes; }
inline XnUInt16 GetParentYRes() const { return m_nParentYRes; }
/** Removes the parent resolution (sets it to current resolution). */
XnStatus ResetSubMap();
protected:
XnStatus ReadPropertiesFromStream();
XnStatus UpdateResolution(XnUInt16 nXRes, XnUInt16 nYRes);
private:
XN_3_6_PUBLIC_MEMBER XnUInt16 m_nXRes;
XN_3_6_PUBLIC_MEMBER XnUInt16 m_nYRes;
XN_3_6_PUBLIC_MEMBER XnUInt16 m_nXOffset;
XN_3_6_PUBLIC_MEMBER XnUInt16 m_nYOffset;
XN_3_6_PUBLIC_MEMBER XnUInt16 m_nParentXRes;
XN_3_6_PUBLIC_MEMBER XnUInt16 m_nParentYRes;
};
#endif //__XN_V_PIXEL_STREAM_DATA_H__
Sensor-Stable-5.1.0.41/Include/XnEE/XnVPoint.h 0000664 0000000 0000000 00000006456 11701035512 0020507 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_POINT_H_
#define _XNV_POINT_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include "XnVStatus.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* XnVPoint represents a point in either Projective or Real World coordinates.
* The XnVPoint doens't know which coordinates are used - this is the user's responsibility.
* The X and Y axis values are floating points, because Real World coordinates require it.
* The Z axis value (or depth) is XN_DEPTH_TYPE.
*/
class XN_EE_CORE_API XnVPoint
{
public:
XnVPoint()
{}
XnVPoint(const XnVPoint& other)
{
SetPoint(other.X(), other.Y(), other.Z());
}
XnVPoint(XnFloat fX, XnFloat fY, XnFloat fZ)
{
SetPoint(fX, fY, fZ);
}
inline void SetPoint(XnFloat fX, XnFloat fY, XnFloat fZ)
{
X() = fX; Y() = fY; Z() = fZ;
}
inline const XnVPoint& operator=(const XnVPoint& ptOther)
{
SetPoint(ptOther.X(), ptOther.Y(), ptOther.Z());
return *this;
}
inline XnFloat X() const
{
return elements[0];
}
inline XnFloat& X()
{
return elements[0];
}
inline XnFloat Y() const
{
return elements[1];
}
inline XnFloat& Y()
{
return elements[1];
}
inline XnFloat Z() const
{
return elements[2];
}
inline XnFloat& Z()
{
return elements[2];
}
protected:
// Actually holding 4 elements, for alignment
XnFloat elements[4];
};
#endif //_XNV_POINT_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVPointContainer.h 0000664 0000000 0000000 00000005160 11701035512 0022341 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_POINT_CONTAINER_H_
#define _XNV_POINT_CONTAINER_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVPoint.h"
#include "XnVContainer.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a specific XnVContainer, for holding XnVPoint instances.
*/
class XN_EE_CORE_API XnVPointContainer : public XnVContainer
{
public:
XnVPointContainer(XnUInt32 nCapacity) :
XnVContainer(nCapacity, sizeof(XnVPoint))
{}
inline XnVPoint& operator[](XnInt32 nIndex)
{
return ((XnVPoint*)Data())[nIndex];
}
inline const XnVPoint& operator[](XnInt32 nIndex) const
{
return ((XnVPoint*)Data())[nIndex];
}
inline void Add(const XnVPoint& ptPoint);
protected:
};
#endif //_XNV_POINT_CONTAINER_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVPropertySet.h 0000664 0000000 0000000 00000007433 11701035512 0021712 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_V_PROPERTY_SET_H__
#define __XN_V_PROPERTY_SET_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include "XnVStatus.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_EE_CORE_API XnVPropertySet
{
public:
XnVPropertySet();
~XnVPropertySet();
class ModuleEnumerator
{
public:
ModuleEnumerator(XnVPropertySet& Set);
~ModuleEnumerator();
XnStatus MoveNext(XnBool& bEnd);
XnStatus GetCurrentModule(const XnChar*& strModule) const;
private:
XnPropertySetModuleEnumerator* m_pInner;
};
class PropertyEnumerator
{
public:
PropertyEnumerator(XnVPropertySet& Set, const XnChar* strModule = NULL);
~PropertyEnumerator();
XnStatus MoveNext(XnBool& bEnd);
XnStatus GetCurrentInfo(XnPropertyType& nType, const XnChar*& strModule, const XnChar*& strProperty) const;
XnStatus GetCurrentValue(XnUInt64& nValue) const;
XnStatus GetCurrentValue(XnDouble& dValue) const;
XnStatus GetCurrentValue(const XnChar*& strValue) const;
XnStatus GetCurrentValue(XnGeneralBuffer& gbValue) const;
private:
XnPropertySetEnumerator* m_pInner;
};
friend class ModuleEnumerator;
friend class PropertyEnumerator;
XnStatus AddModule(const XnChar* strModule);
XnStatus RemoveModule(const XnChar* strModule);
virtual XnStatus AddProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt64 nValue);
virtual XnStatus AddProperty(const XnChar* strModule, const XnChar* strProperty, XnDouble fValue);
virtual XnStatus AddProperty(const XnChar* strModule, const XnChar* strProperty, const XnChar* strValue);
virtual XnStatus AddProperty(const XnChar* strModule, const XnChar* strProperty, const XnGeneralBuffer& gbValue);
XnStatus RemoveProperty(const XnChar* strModule, const XnChar* strProperty);
private:
friend class XnVDevice;
XnPropertySet* m_pSet;
};
#endif //__XN_V_PROPERTY_SET_H__
Sensor-Stable-5.1.0.41/Include/XnEE/XnVRealObject.h 0000664 0000000 0000000 00000007215 11701035512 0021422 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_REAL_OBJECT_H_
#define _XNV_REAL_OBJECT_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVObject.h"
#include "XnVDepthMap.h"
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* A Real Object is an object that exists in the scene.
* These objects contain the XnVDepthMap that describes only them.
* There are currently no implemented real objects.
*/
class XN_EE_FW_API XnVRealObject : public XnVObject
{
public:
XnVRealObject()
{
m_pdmDepthMap = XN_NEW(XnVDepthMap);
m_bAllocated = true;
}
XnVRealObject(XnVDepthMap* pdmMap)
{
m_pdmDepthMap = pdmMap;
m_bAllocated = false;
}
virtual ~XnVRealObject()
{
if (m_bAllocated && m_pdmDepthMap != NULL)
XN_DELETE(m_pdmDepthMap);
}
void SetDepthMap(XnVDepthMap* pdmMap)
{
if (m_bAllocated)
XN_DELETE(m_pdmDepthMap);
m_pdmDepthMap = pdmMap;
m_bAllocated = false;
}
XnVDepthMap* GetDepthMap() const
{
return m_pdmDepthMap;
}
inline XnUInt16 GetXRes() const
{
return m_pdmDepthMap->GetXRes();
}
inline XnUInt16 GetYRes() const
{
return m_pdmDepthMap->GetYRes();
}
virtual XnDepthPixel GetAt(XnUInt16 nX, XnUInt16 nY) const
{
return GetAt(nX + nY*GetXRes());
}
virtual XnDepthPixel GetAt(XnUInt32 nPos) const
{
return m_pdmDepthMap->Data()[nPos];
}
protected:
XnVDepthMap* m_pdmDepthMap;
XnBool m_bAllocated;
};
//---------------------------------------------------------------------------
// Exported Function Declaration
//---------------------------------------------------------------------------
#endif //_XNV_REAL_OBJECT_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVRealWorldTranslator.h 0000664 0000000 0000000 00000012505 11701035512 0023353 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_REAL_WORLD_TRANSLATOR_H_
#define _XNV_REAL_WORLD_TRANSLATOR_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVPoint.h"
#include "XnVStatus.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This algorithm translates points from projective to real world representation and vice versa.
*/
class XN_EE_CORE_API XnVRealWorldTranslator
{
public:
// Constructors
XnVRealWorldTranslator(XnDouble fZeroPlaneDistance, XnDouble fPixelSizeAtZeroPlane,
XnUInt16 nXRes, XnUInt16 nYRes,
XnUInt16 nXFullRes, XnUInt16 nYFullRes, XnUInt16 nXOffset, XnUInt16 nYOffset);
XnVRealWorldTranslator(XnDouble fZeroPlaneDistance, XnDouble fPixelSizeAtZeroPlane,
XnUInt16 nXRes, XnUInt16 nYRes);
// Initializers (or re-initializers)
/**
* Update internal values, relevant for translation purposes.
*
* @param [in] fZeroPlaneDistance The distance (in cm) where the reference was taken.
* @param [in] fPixelSizeAtZeroPlane The size of a pixel at the distance the reference was taken.
* @param [in] nXRes The maximum projective x value of the depth map.
* @param [in] nYRes The maximum projective y value of the depth map.
* @param [in] nXFullRes Future Use - the x-resolution of the depth map that created this one as a submap.
* @param [in] nYFullRes Future Use - the y-resolution of the depth map that created this one as a submap.
* @param [in] nXOffset Future Use - the x-offset of this depth map in the one that created it as a submap.
* @param [in] nYOffset Future Use - the y-offset of this depth map in the one that created it as a submap.
*/
XnStatus Update(XnDouble fZeroPlaneDistance, XnDouble fPixelSizeAtZeroPlane,
XnUInt16 nXRes, XnUInt16 nYRes,
XnUInt16 nXFullRes, XnUInt16 nYFullRes, XnUInt16 nXOffset, XnUInt16 nYOffset);
/**
* Update internal values, relevant for translation purposes.
*
* @param [in] fZeroPlaneDistance The distance (in cm) where the reference was taken.
* @param [in] fPixelSizeAtZeroPlane The size of a pixel at the distance the reference was taken.
* @param [in] nXRes The maximum projective x value of the depth map.
* @param [in] nYRes The maximum projective y value of the depth map.
*/
XnStatus Update(XnDouble fZeroPlaneDistance, XnDouble fPixelSizeAtZeroPlane,
XnUInt16 nXRes, XnUInt16 nYRes);
/**
* Translate point from Real World coordinates to Projective coordinates, rounding the result.
*
* @param [in,out] ptPoint A Real World point on input, Projective on output.
*/
void RW2Projective(XnVPoint& ptPoint) const;
/**
* Translate point from Real World coordinates to Projective coordinates.
*
* @param [in,out] ptPoint A Real World point on input, Projective on output.
*/
void RW2ProjectiveFloat(XnVPoint& ptPoint) const;
/**
* Translate point from Projective coordinates to Real World coordinates.
*
* @param [in,out] ptPoint A Projective point on input, Real World on output.
*/
void Projective2RW(XnVPoint& ptPoint) const;
protected:
XnStatus Init(XnDouble fZeroPlaneDistance, XnDouble fPixelSizeAtZeroPlane,
XnUInt16 nXRes, XnUInt16 nYRes,
XnUInt16 nXFullRes, XnUInt16 nYFullRes, XnUInt16 nXOffset, XnUInt16 nYOffset);
XnDouble m_fZeroPlaneDistance;
XnDouble m_fPixelSizeAtZeroPlane;
XnDouble m_fSourceToDepthPixelRatio;
XnUInt16 m_nXRes;
XnUInt16 m_nYRes;
XnUInt16 m_nXFullRes, m_nYFullRes;
XnUInt16 m_nXOffset, m_nYOffset;
};
#endif //_XNV_REAL_WORLD_TRANSLATOR_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVSkeleton.h 0000664 0000000 0000000 00000006240 11701035512 0021171 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef XNV_SKELETON_H
#define XNV_SKELETON_H
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* A skeleton is comprised of a head, a torso and 2 hands.
* It also holds a labeled object that describes it.
*/
class XN_EE_FW_API XnVSkeleton
{
public:
XnVSkeleton()
{}
XnVSkeleton(const XnVSkeleton& other)
{
m_Head = other.m_Head;
m_Torso = other.m_Torso;
m_RightHand = other.m_RightHand;
m_LeftHand = other.m_LeftHand;
}
const XnVHead& Head() const
{return m_Head;}
XnVHead& Head()
{return m_Head;}
const XnVTorso& Torso() const
{return m_Torso;}
XnVTorso& Torso()
{return m_Torso;}
const XnVHand& RightHand() const
{return m_RightHand;}
XnVHand& RightHand()
{return m_RightHand;}
const XnVHand& LeftHand() const
{return m_LeftHand;}
XnVHand& LeftHand()
{return m_LeftHand;}
const XnVLabeledObject& LabeledObject() const
{return m_LabeledObject;}
XnVLabeledObject& LabeledObject()
{return m_LabeledObject;}
private:
XnVHead m_Head;
XnVTorso m_Torso;
XnVHand m_RightHand, m_LeftHand;
XnVLabeledObject m_LabeledObject;
};
#endif // XNV_SKELETON_H
Sensor-Stable-5.1.0.41/Include/XnEE/XnVSphere.h 0000664 0000000 0000000 00000007004 11701035512 0020632 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_SPHERE_H_
#define _XNV_SPHERE_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnV3DGeometry.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is a specific XnVVirtualObject class, which represents a Real World 3D sphere.
*/
class XN_EE_FW_API XnVSphere : public XnV3DGeometry
{
public:
XnVSphere();
XnVSphere(const XnVPoint& ptCenter, XnUInt32 nRadius);
void SetAttributes(const XnVPoint& ptCenter, XnUInt32 nRadius);
/**
* Intersect the box with a depth map, resulting in the intersection depth map.
*
* @param [in] dmOther The depth map to check against
* @param [out] dmOutput The result of the intersection
*/
XnUInt32 Intersect(const XnVDepthMap& dmOther, XnVDepthMap& dmOutput);
/**
* Check if there is an intersection between the box and the depth map,
* With a minimum size.
*
* @param [in] dmOther The depth map to check against
* @param [in] nThreshold The minimum number of points in order to conclude an intersection
*
* @return true if the intersection had at least the minimum number of point.
*/
XnBool IsIntersect(const XnVDepthMap& dmOther, XnUInt32 nThreshold);
XnBool IsIntersect(const XnV3DVector& pt) const;
/**
* Get the intersection size
*
* @param [in] dmOther The depth map to check against.
*
* @return Number of points in the intersection.
*/
XnUInt32 IntersectionSize(const XnVDepthMap& dmOther);
inline XnBool IsValid()
{
return m_bValid;
}
protected:
XnBool m_bValid;
XnUInt32 m_nRadius;
protected:
XnUInt32 Intersection(const XnVDepthMap& dmOther, XnUInt32 nThreshold, XnVDepthMap* pdmOutput);
};
#endif
Sensor-Stable-5.1.0.41/Include/XnEE/XnVStaticMap.h 0000664 0000000 0000000 00000007061 11701035512 0021274 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_STATIC_SHIFT_MAP_H_
#define _XNV_STATIC_SHIFT_MAP_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVGeneralStaticMap.h"
#include "XnVDepthMap.h"
#include "XnVDevice.h"
/**
* This is a specific Static Map implementation, which implements XnVGeneralStaticMap.
* It uses a measure based on the noise of the depth values as a threshold.
* This value affects the depth differently in different depth values - the larger the depth,
* the larger the noise described by the same threshold.
*/
class XN_EE_FW_API XnVStaticMap : public XnVGeneralStaticMap
{
public:
XnVStaticMap(XnVDevice& Device, const XnChar* strINIFile = NULL);
~XnVStaticMap();
/**
* Add a depth map to the static map.
* If previous static map existed and is in the same resolutions, the current depth map will be added.
* If previous static map existed and is in different resolutions, the current depth map will replace.
*
* @param [in] dmMap A depth map to add to the static.
*/
XnStatus AddMap(const XnVDepthMap& dmMap);
/**
* This threshold is added as the noise relative to the depth in each pixel.
* The default value is 3.
*
* @param [in] nThreshold The new Shift Threshold
*/
void SetShiftThreshold(XnInt16 nThreshold);
XnInt16 GetShiftThreshold() const;
protected:
/**
* Do specific things requires in this type of GeneralStaticMap when it is Reset.
*/
XnStatus DoReset();
XnStatus Init(XnUInt32 nNewSize);
XnDepthPixel DepthToNoise(XnDepthPixel nDepth, XnInt16 nShiftThreshold);
XnBool CreateShiftToDepthTables();
XnBool m_bAllocatedTables;
XnUInt32* m_pAccumulationMap;
XnUInt16* m_pCounterMap;
XnUInt16* m_pShiftToDepth;
XnUInt16* m_pDepthToShift;
XnVDevice* m_pCreatorDevice;
XnInt16 m_nShiftThreshold;
XnUInt32 m_nMaxDepth;
};
#endif
Sensor-Stable-5.1.0.41/Include/XnEE/XnVStatus.h 0000664 0000000 0000000 00000012731 11701035512 0020672 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_STATUS_H_
#define _XNV_STATUS_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
#define XN_MASK_EE_CORE "EECore"
#ifdef XN_EE_CORE_EXPORTS
#define XN_EE_CORE_API XN_API_EXPORT
#else
#define XN_EE_CORE_API XN_API_IMPORT
#endif
#ifdef XN_EE_FW_EXPORTS
#define XN_EE_FW_API XN_API_EXPORT
#else
#define XN_EE_FW_API XN_API_IMPORT
#endif
#ifdef XN_EE_MODULES_EXPORTS
#define XN_EE_MODULES_API XN_API_EXPORT
#else
#define XN_EE_MODULES_API XN_API_IMPORT
#endif
#ifdef XN_USE_DEVICE_3_6
#define XN_3_6_API
#define XN_3_6_PUBLIC_MEMBER public:
#else
#define XN_3_6_API XN_API_DEPRECATED("This is old 3.6 API. Please don't use it anymore")
#define XN_3_6_PUBLIC_MEMBER private:
#endif
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
XN_PS_STATUS_MESSAGE_MAP_START(XN_ERROR_GROUP_EE_CORE)
XN_STATUS_MESSAGE(XN_STATUS_EE_NOT_INITIALIZED, "Device was not initialized!")
XN_STATUS_MESSAGE(XN_STATUS_EE_RESOLUTION_ILLEGAL, "Invalid resolution!")
XN_STATUS_MESSAGE(XN_STATUS_EE_RESOLUTION_MISMATCH, "Resolutions do not match!")
XN_STATUS_MESSAGE(XN_STATUS_EE_NOT_ENOUGH_INFORMATION, "Not enough information!")
XN_STATUS_MESSAGE(XN_STATUS_EE_ILLEGAL_INPUT, "Illegal input!")
XN_STATUS_MESSAGE(XN_STATUS_EE_NOT_ENOUGH_MEMORY, "Not enough memory!")
XN_STATUS_MESSAGE(XN_STATUS_EE_WRONG_DEVICE, "Wrong device!")
XN_STATUS_MESSAGE(XN_STATUS_EE_PARTIAL_SUCCESS, "Operation succeeded partially!")
XN_STATUS_MESSAGE(XN_STATUS_EE_UNSUPPORTED_FUNCTIONALITY, "This functionality is not supported!")
XN_STATUS_MESSAGE(XN_STATUS_EE_BAD_PARAMETER, "Bad parameter!")
XN_STATUS_MESSAGE(XN_STATUS_EE_ERROR, "Error!")
XN_STATUS_MESSAGE(XN_STATUS_EE_MATRIX_NOT_SYMMETRIC, "Matrix must be symmetric for this operation")
XN_PS_STATUS_MESSAGE_MAP_END(XN_ERROR_GROUP_EE_CORE)
//---------------------------------------------------------------------------
// Backwards compatibility
//---------------------------------------------------------------------------
#ifndef XN_MESSAGE_MAP_REGISTER
typedef XnStatus XN_API_DEPRECATED("Please use XnStatus instead.") XnVStatus;
#define DECLARE_DEPRECATED_XNV_STATUS(xnv, xn) \
const XnStatus XN_API_DEPRECATED("Please use " #xn " instead.") xnv = xn;
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_OK, XN_STATUS_OK);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_NOT_INITIALIZED, XN_STATUS_EE_NOT_INITIALIZED);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_RESOLUTION_ILLEGAL, XN_STATUS_EE_RESOLUTION_ILLEGAL);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_RESOLUTION_MISMATCH, XN_STATUS_EE_RESOLUTION_MISMATCH);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_NOT_ENOUGH_INFORMATION, XN_STATUS_EE_NOT_ENOUGH_INFORMATION);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_ILLEGAL_INPUT, XN_STATUS_EE_ILLEGAL_INPUT);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_NOT_ENOUGH_MEMORY, XN_STATUS_EE_NOT_ENOUGH_MEMORY);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_WRONG_DEVICE, XN_STATUS_EE_WRONG_DEVICE);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_PATRIAL_SUCCESS, XN_STATUS_EE_PARTIAL_SUCCESS);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_UNSUPPORTED_FUNCITONALITY, XN_STATUS_EE_UNSUPPORTED_FUNCTIONALITY);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_BAD_PARAMETER, XN_STATUS_EE_BAD_PARAMETER);
DECLARE_DEPRECATED_XNV_STATUS(XNV_STATUS_ERROR, XN_STATUS_EE_ERROR);
DECLARE_DEPRECATED_XNV_STATUS(XN_STATUS_EE_UNSUPPORTED_FUNCITONALITY, XN_STATUS_EE_UNSUPPORTED_FUNCTIONALITY);
#endif
#endif // _XNV_STATUS_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVStream.h 0000664 0000000 0000000 00000005112 11701035512 0020635 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_STREAM_H
#define _XNV_STREAM_H
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include "XnVModule.h"
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* A stream is a specific kind of module - one that has a buffer attached to it.
*/
class XN_EE_CORE_API XnVStream : public XnVModule
{
public:
XnVStream();
XnStatus GetBuffer(void*& pBuffer) const;
XnStatus GetBufferSize(XnUInt32& nSize) const;
XnStatus GetBufferAllocatedSize(XnUInt32& nSize) const;
XnStatus CopyFrom(const XnVStream& other, XnUInt64 nTimestamp = 0);
XnStatus CopyFrom(const void* pSource, XnUInt32 nDataSize, XnUInt64 nTimestamp = 0);
};
#endif // XNV_STREAM_H
Sensor-Stable-5.1.0.41/Include/XnEE/XnVStreamContainer.h 0000664 0000000 0000000 00000012070 11701035512 0022501 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_STREAM_CONTAINER_H_
#define _XNV_STREAM_CONTAINER_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include "XnVStatus.h"
#include "XnVPropertySet.h"
#include
#include "XnVEventHandlers.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This is an interface for any class that holds Streams and Modules.
* Currently implemented a single subclass - XnVDevice.
*/
class XN_EE_CORE_API XnVStreamContainer
{
public:
virtual ~XnVStreamContainer() {}
virtual XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt64& nValue) const = 0;
virtual XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnDouble& fValue) const = 0;
virtual XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt64 nValue) = 0;
virtual XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, XnDouble fValue) = 0;
virtual XnStatus DoesModuleExist(const XnChar* strModule, XnBool* pbDoesExist) const = 0;
virtual XnStatus DoesPropertyExist(const XnChar* strModule, const XnChar* strProperty, XnBool* pbDoesExist) const = 0;
virtual XnStatus GetAllProperties(XnVPropertySet& PropertySet, XnBool bNoStreams = FALSE, const XnChar* strModule = NULL) const = 0;
virtual XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnChar* pcsValue) const = 0;
virtual XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, const XnGeneralBuffer& gbValue) const = 0;
virtual XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, const XnChar* csValue) = 0;
virtual XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, const XnGeneralBuffer& gbValue) = 0;
virtual XnStatus RegisterForPropertyChangedEvent(const XnChar* strModule, const XnChar* strProperty, XnVModulePropertyChangedHandler* pHandler, XnCallbackHandle* phCallback) = 0;
virtual XnStatus RegisterForStreamCollectionChangedEvent(XnVStreamCollectionChangedHandler* pHandler, XnCallbackHandle* phCallback) = 0;
virtual XnStatus UnregisterFromPropertyChangedEvent(const XnChar* strModule, const XnChar* strProperty, XnCallbackHandle hCallback) = 0;
virtual XnStatus UnregisterFromStreamCollectionChangedEvent(XnCallbackHandle hCallback) = 0;
XN_3_6_API virtual XnBool IsModuleExist(const XnChar* strModule) = 0;
XN_3_6_API virtual XnBool IsPropertyExist(const XnChar* strModule, const XnChar* strProperty) = 0;
XN_3_6_API virtual XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt16& nValue) const = 0;
XN_3_6_API virtual XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt32& nValue) const = 0;
XN_3_6_API virtual XnStatus GetProperty(const XnChar* strModule, const XnChar* strProperty, void*& pValue) const = 0;
XN_3_6_API virtual XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt16 nValue) = 0;
XN_3_6_API virtual XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, XnUInt32 nValue) = 0;
XN_3_6_API virtual XnStatus SetProperty(const XnChar* strModule, const XnChar* strProperty, void* pValue) = 0;
};
#endif // _XNV_STREAM_CONTAINER_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVStreamData.h 0000664 0000000 0000000 00000010302 11701035512 0021424 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_V_STREAM_OUTPUT_H__
#define __XN_V_STREAM_OUTPUT_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVEventHandlers.h"
#include "XnVStream.h"
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_EE_CORE_API XnVStreamData : private XnVModulePropertyChangedHandler
{
public:
XnVStreamData(XnVStream* pStream = NULL, XnBool bIsLive = FALSE, XnBool bWaitForDataUpdate = FALSE);
virtual ~XnVStreamData();
XnStatus Initialize(const XnVStreamData& soOther);
inline XnBool IsValid() const { return m_bValid; }
inline XnVStream* GetStream() { return m_pStream; }
inline const XnVStream* GetStream() const { return m_pStream; }
XnVStreamContainer* GetCreator();
const XnVStreamContainer* GetCreator() const;
inline XnBool IsLive() const { return m_bIsLive; }
inline XnBool IsDataNew() const { return m_bIsNewData; }
inline XnUInt64 GetTimestamp() const { return m_nTimestamp; }
inline XnUInt32 GetFrameID() const { return m_nFrameID; }
inline XnUInt32 GetDataSize() const { return m_nDataSize; }
XnStatus SetTimestamp(XnUInt64 nTimestamp);
XnStatus SetFrameID(XnUInt32 nFrameID);
XnStatus SetDataSize(XnUInt32 nDataSize);
XnStatus SetDataNew(XnBool bIsNew);
inline void* Data() const { return m_pData; }
XnStatus CopyFrom(const void* pData, XnUInt32 nDataSize, XnUInt64 nTimestamp = 0);
XnStatus CopyFrom(const XnVStreamData& sd, XnUInt64 nTimestamp = 0);
protected:
friend class XnVDeviceStream;
XnStatus UnderlyingStreamUpdated();
virtual XnStatus ReadPropertiesFromStream();
XnStatus AddWatchedProperty(const XnChar* strProp);
inline void SetValidity(XnBool bValid) { m_bValid = bValid; }
private:
void OnModulePropertyChanged(const XnChar* strModule, const XnChar* strProperty);
typedef struct XnWatchedProperty
{
const XnChar* strName;
XnCallbackHandle hCallback;
} XnWatchedProperty;
XN_DECLARE_LIST_DECL(XN_EE_CORE_API, XnWatchedProperty, XnWatchedPropertiesList)
XnBool m_bIsLive;
XnBool m_bWaitForDataUpdate;
XnWatchedPropertiesList m_WatchedProperties;
XnBool m_bChangeOccurred;
XN_3_6_PUBLIC_MEMBER XnVStream* m_pStream;
XN_3_6_PUBLIC_MEMBER XnBool m_bValid;
XnBool m_bIsNewData;
XnUInt64 m_nTimestamp;
XnUInt32 m_nFrameID;
void* m_pData;
XnUInt32 m_nDataSize;
};
#endif //__XN_V_STREAM_OUTPUT_H__
Sensor-Stable-5.1.0.41/Include/XnEE/XnVTorso.h 0000664 0000000 0000000 00000005225 11701035512 0020515 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef XNV_TORSO_H
#define XNV_TORSO_H
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* A torso is a body part that has a front vector and an up vector.
*/
class XN_EE_FW_API XnVTorso : public XnVBodyPart
{
public:
XnVTorso()
{}
XnVTorso(const XnVTorso& other)
{
m_FrontVector = other.m_FrontVector;
m_UpVector = other.m_UpVector;
}
const XnV3DVector& FrontVector() const
{return m_FrontVector;}
XnV3DVector& FrontVector()
{return m_FrontVector;}
const XnV3DVector& UpVector() const
{return m_UpVector;}
XnV3DVector& UpVector()
{return m_UpVector;}
protected:
XnV3DVector m_FrontVector, m_UpVector;
};
#endif // XNV_TORSO_H
Sensor-Stable-5.1.0.41/Include/XnEE/XnVUpscale.h 0000664 0000000 0000000 00000006573 11701035512 0021012 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_UPSCALE_H_
#define _XNV_UPSCALE_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVDepthMap.h"
#include "XnVImageMap.h"
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* Upscale an XnVDepthMap instance.
* Scaling is done in powers of 2, and is done by using the depth from a certain pixel
* and copying it to the entire nxn depth box, where n is the scale factor.
*/
class XN_EE_FW_API XnVUpscale
{
public:
/**
* Upscale methods:
* MULTIPLY - use the same value for entire upscaled 2nx2n
* GRADUAL - use a gradiant of neighbors. Not Supported.
*/
typedef enum
{
XNV_USM_MULTIPLY,
XNV_USM_GRADUAL,
XNV_USM_UNKNOWN
} XnVUpscaleMethod;
XnVUpscale()
{}
/**
* Upscale a depth map in a factor (which must be a power of 2).
*
* @param [in] dmOrigMap The original depth map
* @param [out] dmNewMap The upscaled depth map
* @param [in] nFactor The factor by which to scale
* @param [in] eUMethod The scale method. XNV_USM_MULTIPLY is the only one implemented.
*/
XnStatus Run(const XnVDepthMap& dmOrigMap, XnVDepthMap& dmNewMap, XnUInt16 nFactor, XnVUpscaleMethod eUMethod);
protected:
XnStatus GetShiftSize(XnUInt16 nFactor, XnInt8& nShiftSize) const;
XnStatus UseOne(const XnVDepthMap& dmOrigMap, XnVDepthMap& dmNewMap, XnUInt8 nShiftSize);
};
#endif //_XNV_UPSCALE_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVUserExtractor.h 0000664 0000000 0000000 00000017111 11701035512 0022216 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_USER_EXTRACTOR_H_
#define _XNV_USER_EXTRACTOR_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVDepthMap.h"
#include "XnVRealObject.h"
#include "XnVLabelMatrix.h"
#include "XnVBoundingBox.h"
#include "XnVPointContainer.h"
#include "XnVConnectedComponentDetector.h"
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
#define MAX_CCS 2000
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* This algorithm uses as input a XnVDepthMap instance and an XnVLabelMatrix,
* which may be the output of XnVConnectedComponentDetector.
* The XnVLabelMatrix can be either supplied by the user
* or XnVConnectedComponentDetector is performed internally.
* The algorithm takes the Connected Component which is closest and large enough
* (threshold exists to determine what "large enough" means"), determines this is
* the basis of the User, and adds all other Connected Components which are
* closer than it, or have some overlap with it (another threshold).
*/
class XN_EE_FW_API XnVUserExtractor
{
public:
XnVUserExtractor();
~XnVUserExtractor();
/**
* Extracts a user from the depth map, putting the result in a XnVRealObject object supplied.
* A Label Matrix is supplied, created externally.
*
* @param [in] dmMap the depth map to work on.
* @param [in] lmLabels the label matrix, the output of the XnVConnectedComponentDetector
* @param [in,out] roUser The user in which to put the output.
* @param [in] bKeep Should keep the user extracted. False means to have all the scene except for it.
*/
XnStatus Run(XnVDepthMap& dmMap, const XnVLabelMatrix& lmLabels, XnVRealObject& roUser, XnBool bKeep = true)
{
return Run(dmMap, lmLabels, roUser.GetDepthMap(), bKeep);
}
/**
* Extracts a user from the depth map, leaving only it in the original depth map.
* A Label Matrix is supplied, created externally.
*
* @param [in,out] dmMap the depth map to start from. On success, it will contain only the user.
* @param [in] lmLabels The label matrix, the output of the XnVConenctedComponentDetector
*/
XnStatus Run(XnVDepthMap& dmMap, const XnVLabelMatrix& lmLabels)
{
return Run(dmMap, lmLabels, NULL, true);
}
/**
* Extracts a user from the depth map, putting the result in a XnVRealObject object supplied.
*
* @param [in] dmMap the depth map to work on.
* @param [in,out] roUser The user in which to put the output.
* @param [in] bKeep Should keep the user extracted. False means to have all the scene except for it.
*/
XnStatus Run(XnVDepthMap& dmMap, XnVRealObject& roUser, XnBool bKeep = true)
{
XnStatus rc;
rc = CreateLabels(dmMap);
if (rc != XN_STATUS_OK)
return rc;
return Run(dmMap, *m_pLabels, roUser, bKeep);
}
/**
* Extracts a user from the depth map, leaving only it in the original depth map.
*
* @param [in,out] dmMap the depth map to start from. On success, it will contain only the user.
*/
XnStatus Run(XnVDepthMap& dmMap)
{
XnStatus rc;
rc = CreateLabels(dmMap);
if (rc != XN_STATUS_OK)
return rc;
return Run(dmMap, *m_pLabels);
}
/**
* MinSizeRatioToChoose determines the minimal size of chosen connected component.
* The chosen connected component is the closest one that is at least the proper size.
* The size used is the total amount of pixels divided by this parameter.
* For instance, if the full resolution is 640x480, and the threshold is set to 32,
* then the minimal size a connected component must be to be considered large enough
* is (640*480)/32 = 9600 pixels.
* The default value is 32.
*
* @param [in] nMinSizeRatioToChoose
*/
void SetMinSizeRatioToChoose(XnUInt32 nMinSizeRatioToChoose)
{
m_nMinSizeRatioToChoose = nMinSizeRatioToChoose;
}
XnUInt32 GetMinSizeRatioToChoose() const
{
return m_nMinSizeRatioToChoose;
}
/**
* DepthOverlap determines the minimal overlap in depth that a connected component has to have
* with the chosen connected component, in order to be a candidate to join it as the user.
* For instance, a depth overlap threshold of 1 means any connected component with at least
* one pixel closer by 1 than the maximal depth of the chosen connected component is added to the user.
* Smaller values will cause further connected components to be added.
* The default value is 0.
*
* @param [in] nDepthOverlap
*/
void SetDepthOverlap(XnInt32 nDepthOverlap)
{
m_nDepthOverlap = nDepthOverlap;
}
XnInt32 GetDepthOverlap() const
{
return m_nDepthOverlap;
}
/**
* UseUserBoundingBox is used after a connected component is chosen.
* If it is true, then all other connected components that don't have any pixel
* in the chosen one's bounding box will not be considered to be part of the user.
* The default value is false.
*
* @param [in] bUseUserBoundingBox
*/
void SetUseUserBoundingBox(XnBool bUseUserBoundingBox)
{
m_bUseUserBoundingBox = bUseUserBoundingBox;
}
XnBool GetUseUserBoundingBox() const
{
return m_bUseUserBoundingBox;
}
protected:
XnStatus Run(XnVDepthMap& dmMap, const XnVLabelMatrix& lmLabels, XnVDepthMap* dmOutput, XnBool bKeep);
XnStatus GetCCs(const XnVDepthMap& dmMap, const XnVLabelMatrix& lmLabels1,
XnUInt16 nMinX, XnUInt16 nMaxX, XnUInt16 nMinY, XnUInt16 nMaxY);
XnStatus InitializeLabels();
XnStatus CreateLabels(XnVDepthMap& dmMap);
XnVBoundingBox m_CCs[MAX_CCS];
XnVDepthMap m_dmWorkingMap;
XnUInt32 m_nMinSizeRatioToChoose;
XnInt32 m_nDepthOverlap;
XnBool m_bUseUserBoundingBox;
XnVConnectedComponentDetector* m_pagLabeler;
XnVLabelMatrix* m_pLabels;
};
#endif //_XNV_USER_EXTRACTOR_H_
Sensor-Stable-5.1.0.41/Include/XnEE/XnVVirtualObject.h 0000664 0000000 0000000 00000010447 11701035512 0022166 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XNV_VIRTUAL_OBJECT_H_
#define _XNV_VIRTUAL_OBJECT_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVObject.h"
#include "XnVDepthMap.h"
#include "XnVBoundingBox.h"
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/**
* XnVVirtualObject is a base class for all user-created objects that are inserted
* into the scene.
* Each of these objects must be able to intersect with a XnVDepthMap.
* The intersection is in Real World coordinations.
* Currently implemented virtual objects include XnV3DBox and XnVSphere.
*/
class XN_EE_FW_API XnVVirtualObject : public XnVObject
{
public:
XnVVirtualObject();
virtual ~XnVVirtualObject() {}
/**
* Intersect the virtual object with the depth map.
* Intersection is done in Real World coordinations.
* Adds the pixels from the input depth map that are inside or on the virtual object
* to the output depth map.
* No pixels are deleted from the output depth map if they already exist.
*
* @param [in] dmOther The input depth map on which to run.
* @param [in,out] dmOutput The output depth map, with only the pixels inside or on the virtual object.
*/
virtual XnUInt32 Intersect(const XnVDepthMap& dmOther, XnVDepthMap& dmOutput) = 0;
/**
* Is there at least nThreshold pixels in the intersection of the depth map and
* this virtual object?
*
* @param [in] dmOther The input depth map.
* @param [in] nThreshold The minimal number of pixels to consider intersection.
*/
virtual XnBool IsIntersect(const XnVDepthMap& dmOther, XnUInt32 nThreshold) = 0;
/**
* What is the size of the intersection between the input depth map and this virtual object?
*
* @param [in] dmOther The input depth map.
*/
virtual XnUInt32 IntersectionSize(const XnVDepthMap& dmOther) = 0;
protected:
/**
* Sets a Projective bounding box.
* This Projective bounding box will assist in intersections.
*
* @param [in] ptMins Minimum point
* @param [in] ptMaxs Maximum point
* @param [in] drDepth Depth representation, mainly for the Real World Translator inside.
* @param [in] bProjective If the input isn't Projective (false, which means Real World), the points should be translated.
*/
XnStatus SetBoundingBox(const XnVPoint& ptMins, const XnVPoint& ptMaxs, const XnVDepthRepresentation& drDepth, XnBool bProjective);
XnUInt16 m_nXResWhenBounding, m_nYResWhenBounding;
XnVBoundingBox m_BoundingBox;
};
#endif //_XNV_VIRTUAL_OBJECT_H_
Sensor-Stable-5.1.0.41/Include/XnFormatsStatus.h 0000664 0000000 0000000 00000011761 11701035512 0021303 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_FORMATS_STATUS_H_
#define _XN_FORMATS_STATUS_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
XN_PS_STATUS_MESSAGE_MAP_START(XN_ERROR_GROUP_FORMATS)
XN_STATUS_MESSAGE(XN_STATUS_FORMATS_NOT_INIT, "Xiron Formats library was not initialized!")
XN_STATUS_MESSAGE(XN_STATUS_FORMATS_ALREADY_INIT, "Xiron Formats library was already initialized!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_DEPTH_FORMAT, "Invalid Xiron I/O stream depth format!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_IMAGE_FORMAT, "Invalid Xiron I/O stream image format!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_MISC_FORMAT, "Invalid Xiron I/O stream misc format!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_AUDIO_FORMAT, "Invalid Xiron I/O stream audio format!")
XN_STATUS_MESSAGE(XN_STATUS_IO_COMPRESSION_INIT_FAILED, "Xiron I/O compression initialization failed!")
XN_STATUS_MESSAGE(XN_STATUS_IO_COMPRESSION_FAILED, "Xiron I/O compression failed!")
XN_STATUS_MESSAGE(XN_STATUS_IO_DECOMPRESSION_FAILED, "Xiron I/O decompression failed!")
XN_STATUS_MESSAGE(XN_STATUS_IO_COMPRESSED_BUFFER_TOO_SMALL, "The compressed input buffer is too small to be valid!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_COMPRESSED_BUFFER_SIZE, "Invalid compressed buffer size!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_DEPTH_COMPRESSION_FORMAT, "Invalid depth compression format!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_IMAGE_COMPRESSION_FORMAT, "Invalid image stream compression format!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_MISC_COMPRESSION_FORMAT, "Invalid misc stream compression format!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_AUDIO_COMPRESSION_FORMAT, "Invalid audio stream compression format!")
XN_STATUS_MESSAGE(XN_STATUS_IO_UNSUPPORTED_COMPRESSION_FORMAT, "This compression format is no longer supported!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_PACKED_BUFFER, "Invalid Xiron I/O packed stream buffer!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_HEADER, "Invalid Xiron I/O stream header!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_DEPTH_BUFFER, "Invalid Xiron I/O stream depth buffer!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_IMAGE_BUFFER, "Invalid Xiron I/O stream image buffer!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_MISC_BUFFER, "Invalid Xiron I/O stream misc buffer!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_AUDIO_BUFFER, "Invalid Xiron I/O stream audio buffer!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_DEPTH_BUFFER_SIZE, "Invalid Xiron I/O stream depth buffer size!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_IMAGE_BUFFER_SIZE, "Invalid Xiron I/O stream image buffer size!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_MISC_BUFFER_SIZE, "Invalid Xiron I/O stream misc buffer size!")
XN_STATUS_MESSAGE(XN_STATUS_IO_INVALID_STREAM_AUDIO_BUFFER_SIZE, "Invalid Xiron I/O stream audio buffer size!")
XN_STATUS_MESSAGE(XN_STATUS_INVALID_OUTPUT_FORMAT_FOR_RESOLUTION, "Pixel format is not supported for this resolution!")
XN_PS_STATUS_MESSAGE_MAP_END(XN_ERROR_GROUP_FORMATS)
#endif //_XN_FORMATS_STATUS_H_
Sensor-Stable-5.1.0.41/Include/XnIOFileStream.h 0000664 0000000 0000000 00000005157 11701035512 0020751 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_IO_FILE_STREAM_H__
#define __XN_IO_FILE_STREAM_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_CORE_CPP_API XnIOFileStream : public XnIOStream
{
public:
XnIOFileStream(const XnChar* pcsFileName, XnUInt32 nFlags);
~XnIOFileStream() { Free(); }
virtual XnStatus WriteData(const XnUChar* pData, XnUInt32 nDataSize);
virtual XnStatus ReadData(XnUChar* pData, XnUInt32 nDataSize);
virtual XnStatus Init();
virtual XnStatus Free();
XnStatus Tell(XnUInt64* pnOffset);
XnStatus Seek(XnUInt64 nOffset);
private:
const XnChar* m_pcsFileName;
XnUInt32 m_nFlags;
XN_FILE_HANDLE m_hFile;
};
#endif //__XN_IO_FILE_STREAM_H__ Sensor-Stable-5.1.0.41/Include/XnIONetworkStream.h 0000664 0000000 0000000 00000005244 11701035512 0021520 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_IO_NETWORK_STREAM_H__
#define __XN_IO_NETWORK_STREAM_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_CORE_CPP_API XnIONetworkStream : public XnIOStream
{
public:
XnIONetworkStream(XN_SOCKET_HANDLE hSocket);
~XnIONetworkStream() { Free(); }
virtual XnStatus WriteData(const XnUChar* pData, XnUInt32 nDataSize);
virtual XnStatus ReadData(XnUChar* pData, XnUInt32 nDataSize);
virtual XnStatus Init();
virtual XnStatus Free();
inline XnBool IsConnected() const { return m_bIsConnected; }
void SetReadTimeout(XnUInt32 nMicrosecondsReadTimeout);
private:
XnUInt32 m_nReadTimeout;
XN_SOCKET_HANDLE m_hSocket;
XnBool m_bIsConnected;
};
#endif //__XN_IO_NETWORK_STREAM_H__ Sensor-Stable-5.1.0.41/Include/XnIOParams.h 0000664 0000000 0000000 00000021535 11701035512 0020137 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_IO_PARAMS_H_
#define _XN_IO_PARAMS_H_
#include
#include
#include
#define XN_IO_PARAM_MIN_DEPTH_VALUE "MinDepthValue"
#define XN_IO_PARAM_MAX_DEPTH_VALUE "MaxDepthValue"
#define XN_IO_PARAM_FRAME_DELAY "FrameDelay"
#define XN_IO_PARAM_DEPTH_COMPRESSION "DepthCompression"
#define XN_IO_PARAM_IMAGE_COMPRESSION "ImageCompression"
#define XN_IO_PARAM_MISC_COMPRESSION "MiscCompression"
#define XN_IO_PARAM_AUDIO_COMPRESSION "AudioCompression"
#define XN_IO_PARAM_RGB_REGISTRAR_STATE "RGBRegistrarState"
#define XN_IO_PARAM_AUDIO_ENABLED "AudioEnabled"
#define XN_IO_PARAM_AUDIO_LEFT_CHANNEL_VOLUME "AudioLeftChannelVolume"
#define XN_IO_PARAM_AUDIO_RIGHT_CHANNEL_VOLUME "AudioRightChannelVolume"
#define XN_IO_PARAM_AUDIO_SAMPLE_RATE "AudioSampleRate"
#define XN_IO_PARAM_AUDIO_READ_MODE "AudioReadMode"
#define XN_IO_PARAM_AUDIO_READ_CHUNK_SIZE "AudioReadChunkSize"
#define XN_IO_PARAM_AUDIO_READ_SYNC "AudioReadSync"
#define XN_IO_PARAM_DEPTH_WHITE_BALANCE "DepthWhiteBalance"
#define XN_IO_PARAM_DEPTH_INPUT_FORMAT "DepthInputFormat"
#define XN_IO_PARAM_IMAGE_INPUT_FORMAT "ImageInputFormat"
#define XN_IO_PARAM_DEPTH_STATE "DepthState"
#define XN_IO_PARAM_IMAGE_STATE "ImageState"
#define XN_IO_PARAM_HIGHRES_TIMESTAMPS "HighresTimestamps"
#define XN_IO_REGMODE_NO_REGISTER (XnUInt32)0
#define XN_IO_REGMODE_IMAGE_TO_DEPTH (XnUInt32)1
#define XN_IO_REGMODE_DEPTH_TO_IMAGE (XnUInt32)2
#ifdef _XN_DEPRECATE_OLD_IO
#pragma deprecated ("XN_IO_PARAM_MIN_DEPTH_VALUE", "XN_IO_PARAM_MAX_DEPTH_VALUE", "XN_IO_PARAM_FRAME_DELAY", "XN_IO_PARAM_DEPTH_COMPRESSION")
#pragma deprecated ("XN_IO_PARAM_IMAGE_COMPRESSION", "XN_IO_PARAM_MISC_COMPRESSION", "XN_IO_PARAM_AUDIO_COMPRESSION", "XN_IO_PARAM_RGB_REGISTRAR_STATE")
#pragma deprecated ("XN_IO_PARAM_AUDIO_ENABLED", "XN_IO_PARAM_AUDIO_LEFT_CHANNEL_VOLUME", "XN_IO_PARAM_AUDIO_RIGHT_CHANNEL_VOLUME")
#pragma deprecated ("XN_IO_PARAM_AUDIO_SAMPLE_RATE", "XN_IO_PARAM_AUDIO_READ_MODE", "XN_IO_PARAM_AUDIO_READ_CHUNK_SIZE")
#pragma deprecated ("XN_IO_PARAM_AUDIO_READ_SYNC", "XN_IO_PARAM_GMC_MODE", "XN_IO_PARAM_DEPTH_WHITE_BALANCE", "XN_IO_PARAM_DEPTH_INPUT_FORMAT")
#pragma deprecated ("XN_IO_PARAM_IMAGE_INPUT_FORMAT", "XN_IO_PARAM_DEPTH_STATE", "XN_IO_PARAM_IMAGE_STATE", "XN_IO_PARAM_READ_LOG_INTERVAL")
#pragma deprecated ("XN_IO_REGMODE_NO_REGISTER", "XN_IO_REGMODE_IMAGE_TO_DEPTH", "XN_IO_REGMODE_DEPTH_TO_IMAGE")
#endif
typedef XN_OLD_IO_API enum XnIOParams
{
XN_IO_PARAM_IMAGE_RESOLUTION = 0, // Get only for now
XN_IO_PARAM_IMAGE_FPS = 1, // Get only for now
XN_IO_PARAM_IMAGE_AGC = 2, // PARAM_RGB_AGC
XN_IO_PARAM_IMAGE_CONTROL_PROCESSING = 3, // I2C
XN_IO_PARAM_IMAGE_FLICKER_DETECTION = 4, // PARAM_IMAGE_FLICKER_DETECTION
XN_IO_PARAM_DEPTH_RESOLUTION = 5, // Get only for now
XN_IO_PARAM_DEPTH_FPS = 6, // Get only for now
XN_IO_PARAM_DEPTH_AGC = 7, // PARAM_DEPTH_AGC
XN_IO_PARAM_DEPTH_HOLE_FILTER = 8, // PARAM_HOLE_FILTER
XN_IO_PARAM_DEPTH_CONTROL_PROCESSING = 9, // I2C
XN_IO_PARAM_IR_RESOLUTION = 10, // Get only for now
XN_IO_PARAM_IR_FPS = 11, // Get only for now
XN_IO_PARAM_IR_AGC = 12,
XN_IO_PARAM_REGISTRATION = 13, // PARAM_REGISTRATION_ENABLE
XN_IO_PARAM_FRAME_SYNC = 14, // PARAM_FRAME_SYNC_BY
XN_IO_PARAM_DEPTH_MIRROR = 15, // PARAM_MIRROR
XN_IO_PARAM_INNER_PARAM = 17, // PARAM
XN_IO_PARAM_VERSION = 18, // VERSION
XN_IO_PARAM_PRIMARY = 25, // 'Read' returns when new image, new depth or new any received
XN_IO_PARAM_READ_WRITE_MODE = 26, // Get only
XN_IO_PARAM_SHIFT2DEPTH = 27,
XN_IO_PARAM_DEPTH2SHIFT = 28,
XN_IO_PARAM_RESET = 29, // Reset (either power or software)
XN_IO_PARAM_CURRENT_MODE = 31, // Maintenance/Normal
XN_IO_PARAM_LAST_RAW_IMAGE = 32, // Last RAW Image
XN_IO_PARAM_IR_CROPPING = 33, // IR Cropping
XN_IO_PARAM_IMAGE_QUALITY = 38, // Image Quality - 0-default, 1-low, 2-medium, 3-high
XN_IO_PARAM_CMOS_BLANKING_UNITS = 46, // XnCmosBlanking
XN_IO_PARAM_CMOS_BLANKING_TIME = 47, // XnCmosBlankingTime
XN_IO_PARAM_DEPTH_AGC_BIN = 48, // XnDepthAGCBin
XN_IO_PARAM_SUPPORTS_MIRRORING = 49, // Is mirror supported (bool, get only)
XN_IO_PARAM_MIRROR = 50,
XN_IO_PARAM_IMAGE_MIRROR = 51,
XN_IO_PARAM_IR_MIRROR = 52,
} XnIOParams;
typedef XN_OLD_IO_API enum
{
XN_IO_DEPTH_DECIMATION_DISABLED,
XN_IO_DEPTH_DECIMATION_ENABLED
} XnIODepthDecimation;
// some structs here that are deprecated holds other deprecated, so disable warnings
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
typedef XN_OLD_IO_API struct XnDeviceSensorParameters
{
XnBool bConfigure;
XnUInt8 VideoMode;
XnBool bAudioOn;
XnIOImageFormats ImageFormat;
XnIODepthFormats DepthFormat;
XnIODepthDecimation DepthDecimation;
} XnDeviceSensorParameters;
typedef XN_OLD_IO_API enum
{
XN_PRIMARY_ANY,
XN_PRIMARY_DEPTH,
XN_PRIMARY_IMAGE
} XnParamPrimary;
#pragma pack (push, 1)
typedef XN_OLD_IO_API struct {
XnUChar* pBuffer;
XnUInt32 nBufferSize;
} XnDataBuffer;
#pragma pack (pop)
#pragma warning (pop)
// Set Param
// (xx)(yyy)(zzz) - byte comprised of mode(x), stream0(y), stream1(z)
#define XN_VIDEO_PS_MODE 0
#define XN_VIDEO_WEBCAM_MODE 1
#define XN_VIDEO_CURRENT_GET_MODE(x) (((x)>>6)&0x03)
#define XN_VIDEO_STREAM0_GET_MODE(x) (((x)>>3)&0x07)
#define XN_VIDEO_STREAM1_GET_MODE(x) ((x)&0x07)
#define XN_VIDEO_CURRENT_MODE(x) ((x)<<6)
#define XN_VIDEO_STREAM0_MODE(x) (((x)&0x7)<<3)
#define XN_VIDEO_STREAM1_MODE(x) ((x)&0x7)
#define XN_VIDEO_MODE(current, stream0, stream1) \
(XN_VIDEO_CURRENT_MODE(current)|XN_VIDEO_STREAM0_MODE(stream0)|XN_VIDEO_STREAM1_MODE(stream1))
#define XN_VIDEO_MODE_OFF XN_VIDEO_MODE(XN_VIDEO_PS_MODE, XN_VIDEO_STREAM_OFF, XN_VIDEO_STREAM_OFF) // 0x00
#define XN_VIDEO_MODE_COLOR_PS XN_VIDEO_MODE(XN_VIDEO_PS_MODE, XN_VIDEO_STREAM_COLOR, XN_VIDEO_STREAM_OFF) // 0x08
#define XN_VIDEO_MODE_IR XN_VIDEO_MODE(XN_VIDEO_PS_MODE, XN_VIDEO_STREAM_IR, XN_VIDEO_STREAM_OFF) // 0x18
#define XN_VIDEO_MODE_DEPTH XN_VIDEO_MODE(XN_VIDEO_PS_MODE, XN_VIDEO_STREAM_OFF, XN_VIDEO_STREAM_DEPTH)// 0x02
#define XN_VIDEO_MODE_COLOR_DEPTH XN_VIDEO_MODE(XN_VIDEO_PS_MODE, XN_VIDEO_STREAM_COLOR, XN_VIDEO_STREAM_DEPTH)// 0x0a
#define XN_VIDEO_MODE_DEPTH_IR XN_VIDEO_MODE(XN_VIDEO_PS_MODE, XN_VIDEO_STREAM_IR, XN_VIDEO_STREAM_DEPTH)// 0x1a
// Not supported for now?
#define XN_VIDEO_MODE_WEBCAM XN_VIDEO_MODE(XN_VIDEO_WEBCAM_MODE, XN_VIDEO_STREAM_COLOR, XN_VIDEO_STREAM_OFF) // 0x48
#define XN_VIDEO_MODE_COLOR_IR XN_VIDEO_MODE(XN_VIDEO_PS_MODE, XN_VIDEO_STREAM_COLOR, XN_VIDEO_STREAM_IR) // 0x0b
#ifdef _XN_DEPRECATE_OLD_IO
#pragma deprecated ("XN_VIDEO_PS_MODE", "XN_VIDEO_WEBCAM_MODE")
#pragma deprecated ("XN_VIDEO_CURRENT_GET_MODE", "XN_VIDEO_STREAM0_GET_MODE", "XN_VIDEO_STREAM1_GET_MODE")
#pragma deprecated ("XN_VIDEO_CURRENT_MODE", "XN_VIDEO_STREAM0_MODE", "XN_VIDEO_STREAM1_MODE", "XN_VIDEO_MODE")
#pragma deprecated ("XN_VIDEO_MODE_OFF", "XN_VIDEO_MODE_COLOR_PS", "XN_VIDEO_MODE_IR", "XN_VIDEO_MODE_DEPTH")
#pragma deprecated ("XN_VIDEO_MODE_COLOR_DEPTH", "XN_VIDEO_MODE_DEPTH_IR", "XN_VIDEO_MODE_WEBCAM", "XN_VIDEO_MODE_COLOR_IR")
#endif
#endif
Sensor-Stable-5.1.0.41/Include/XnIOStream.h 0000664 0000000 0000000 00000004704 11701035512 0020146 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_IO_STREAM_H__
#define __XN_IO_STREAM_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
class XN_CORE_CPP_API XnIOStream
{
public:
XnIOStream() {}
virtual ~XnIOStream() {}
virtual XnStatus WriteData(const XnUChar* pData, XnUInt32 nDataSize) = 0;
virtual XnStatus ReadData(XnUChar* pData, XnUInt32 nDataSize) = 0;
virtual XnStatus Init() { return XN_STATUS_OK; }
virtual XnStatus Free() { return XN_STATUS_OK; }
};
#endif //__XN_IO_STREAM_H__ Sensor-Stable-5.1.0.41/Include/XnPlatformBC.h 0000664 0000000 0000000 00000006007 11701035512 0020452 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_PS_PLATFORM_H__
#define __XN_PS_PLATFORM_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
#define _XN_DEPRECATED_TYPE(newType, oldType) \
XN_API_DEPRECATED("Please use " XN_STRINGIFY(newType) " instead.") typedef newType oldType;
_XN_DEPRECATED_TYPE(XnChar, XN_CHAR)
_XN_DEPRECATED_TYPE(XnUChar, XN_UCHAR)
_XN_DEPRECATED_TYPE(XnInt8, XN_INT8)
_XN_DEPRECATED_TYPE(XnUInt8, XN_UINT8)
_XN_DEPRECATED_TYPE(XnInt16, XN_INT16)
_XN_DEPRECATED_TYPE(XnUInt16, XN_UINT16)
_XN_DEPRECATED_TYPE(XnInt32, XN_INT32)
_XN_DEPRECATED_TYPE(XnUInt32, XN_UINT32)
_XN_DEPRECATED_TYPE(XnInt64, XN_INT64)
_XN_DEPRECATED_TYPE(XnUInt64, XN_UINT64)
_XN_DEPRECATED_TYPE(XnFloat, XN_FLOAT)
_XN_DEPRECATED_TYPE(XnDouble, XN_DOUBLE)
_XN_DEPRECATED_TYPE(XnBool, XN_BOOL)
_XN_DEPRECATED_TYPE(XnWChar, XN_WCHAR)
_XN_DEPRECATED_TYPE(XnInt, XN_LONG)
_XN_DEPRECATED_TYPE(XnUInt, XN_ULONG)
XN_API_DEPRECATED("Please use XnDepthPixel instead") typedef XnUInt16 XN_DEPTH_TYPE;
XN_API_DEPRECATED("Please use XnRGB24Pixel instead") typedef XnUChar XN_IMAGE_TYPE;
#endif // __XN_PS_PLATFORM_H__
Sensor-Stable-5.1.0.41/Include/XnPropertySet.h 0000664 0000000 0000000 00000024043 11701035512 0020761 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_PROPERTY_SET_H__
#define __XN_PROPERTY_SET_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/** The type of the property. */
typedef enum XnPropertyType
{
XN_PROPERTY_TYPE_INTEGER,
XN_PROPERTY_TYPE_REAL,
XN_PROPERTY_TYPE_STRING,
XN_PROPERTY_TYPE_GENERAL,
} XnPropertyType;
struct XnPropertySet; // Forward Declaration
typedef struct XnPropertySet XnPropertySet;
struct XnPropertySetModuleEnumerator; // Forward Declaration
typedef struct XnPropertySetModuleEnumerator XnPropertySetModuleEnumerator;
struct XnPropertySetEnumerator; // Forward Declaration
typedef struct XnPropertySetEnumerator XnPropertySetEnumerator;
//---------------------------------------------------------------------------
// Exported functions
//---------------------------------------------------------------------------
/**
* Creates a new property set.
*
* @param ppSet [out] A pointer to the new set.
*/
XN_DDK_API XnStatus XnPropertySetCreate(XnPropertySet** ppSet);
/**
* Destroys a previously created property set.
*
* @param ppSet [in/out] A pointer to the set.
*/
XN_DDK_API XnStatus XnPropertySetDestroy(XnPropertySet** ppSet);
/**
* Clears a property set from all the properties.
*
* @param pSet [in] The property set.
*/
XN_DDK_API XnStatus XnPropertySetClear(XnPropertySet* pSet);
/**
* Adds a module to the property set.
*
* @param pSet [in] The property set.
* @param strModuleName [in] Name of the module to add.
*/
XN_DDK_API XnStatus XnPropertySetAddModule(XnPropertySet* pSet, const XnChar* strModuleName);
/**
* Removes a module from the property set.
*
* @param pSet [in] The property set.
* @param strModuleName [in] Name of the module to remove.
*/
XN_DDK_API XnStatus XnPropertySetRemoveModule(XnPropertySet* pSet, const XnChar* strModuleName);
/**
* Adds an integer property to the property set.
*
* @param pSet [in] The property set.
* @param strModuleName [in] Name of the module.
* @param strModuleName [in] Name of the property to add.
* @param nValue [in] Value for that property.
*/
XN_DDK_API XnStatus XnPropertySetAddIntProperty(XnPropertySet* pSet, const XnChar* strModuleName, const XnChar* strProperty, XnUInt64 nValue);
/**
* Adds an real property to the property set.
*
* @param pSet [in] The property set.
* @param strModuleName [in] Name of the module.
* @param strModuleName [in] Name of the property to add.
* @param dValue [in] Value for that property.
*/
XN_DDK_API XnStatus XnPropertySetAddRealProperty(XnPropertySet* pSet, const XnChar* strModuleName, const XnChar* strProperty, XnDouble dValue);
/**
* Adds an string property to the property set.
*
* @param pSet [in] The property set.
* @param strModuleName [in] Name of the module.
* @param strModuleName [in] Name of the property to add.
* @param strValue [in] Value for that property.
*/
XN_DDK_API XnStatus XnPropertySetAddStringProperty(XnPropertySet* pSet, const XnChar* strModuleName, const XnChar* strProperty, const XnChar* strValue);
/**
* Adds an general property to the property set.
*
* @param pSet [in] The property set.
* @param strModuleName [in] Name of the module.
* @param strModuleName [in] Name of the property to add.
* @param pgbValue [in] Value for that property.
*/
XN_DDK_API XnStatus XnPropertySetAddGeneralProperty(XnPropertySet* pSet, const XnChar* strModuleName, const XnChar* strProperty, const XnGeneralBuffer* pgbValue);
/**
* Removes a property from the property set.
*
* @param pSet [in] The property set.
* @param strModuleName [in] Name of the module.
* @param strModuleName [in] Name of the property to remove.
*/
XN_DDK_API XnStatus XnPropertySetRemoveProperty(XnPropertySet* pSet, const XnChar* strModuleName, const XnChar* strProperty);
/**
* Gets a modules enumerator. This enumerator should be freed using XnPropertySetModuleEnumeratorFree.
*
* @param pSet [in] The property set.
* @param ppEnumerator [out] The created enumerator.
*/
XN_DDK_API XnStatus XnPropertySetGetModuleEnumerator(const XnPropertySet* pSet, XnPropertySetModuleEnumerator** ppEnumerator);
/**
* Frees a previously created module enumerator.
*
* @param ppEnumerator [in/out] The enumerator.
*/
XN_DDK_API XnStatus XnPropertySetModuleEnumeratorFree(XnPropertySetModuleEnumerator** ppEnumer);
/**
* Moves the enumerator to the next module. This function must be called *before* getting current.
*
* @param pEnumerator [in] The enumerator.
* @param pbEnd [out] TRUE if the enumerator has reached the end of the collection.
*/
XN_DDK_API XnStatus XnPropertySetModuleEnumeratorMoveNext(XnPropertySetModuleEnumerator* pEnumerator, XnBool* pbEnd);
/**
* Gets the current module name from the enumerator.
*
* @param pEnumerator [in] The enumerator.
* @param pstrModuleName [out] The name of the current module.
*/
XN_DDK_API XnStatus XnPropertySetModuleEnumeratorGetCurrent(const XnPropertySetModuleEnumerator* pEnumer, const XnChar** pstrModuleName);
/**
* Gets a property enumerator. This enumerator must be freed using XnPropertySetEnumeratorFree.
*
* @param pSet [in] The property set.
* @param ppEnumerator [in/out] The enumerator.
* @param strModule [in] Optional. When provided, only properties of this module will be enumerated.
*/
XN_DDK_API XnStatus XnPropertySetGetEnumerator(const XnPropertySet* pSet, XnPropertySetEnumerator** ppEnumerator, const XnChar* strModule = NULL);
/**
* Finds a property according to its name and module, and returns an enumerator to it.
* This enumerator must be freed using XnPropertySetEnumeratorFree.
*
* @param pSet [in] The property set.
* @param strModule [in] The module name.
* @param strProp [in] The property name.
* @param ppEnumerator [in/out] The enumerator.
*/
XN_DDK_API XnStatus XnPropertySetFindProperty(const XnPropertySet* pSet, const XnChar* strModule, const XnChar* strProp, XnPropertySetEnumerator** ppEnumerator);
/**
* Frees a previously created properties enumerator.
*
* @param ppEnumerator [in/out] The enumerator.
*/
XN_DDK_API XnStatus XnPropertySetEnumeratorFree(XnPropertySetEnumerator** ppEnumerator);
/**
* Moves the enumerator to the next property. This function must be called *before* getting current.
*
* @param pEnumerator [in] The enumerator.
* @param pbEnd [out] TRUE if the enumerator has reached the end of the collection.
*/
XN_DDK_API XnStatus XnPropertySetEnumeratorMoveNext(XnPropertySetEnumerator* pEnumerator, XnBool* pbEnd);
/**
* Gets information regarding the current property.
*
* @param pEnumerator [in] The enumerator.
* @param pnType [out] The type of the current property.
* @param pstrModule [out] The module of the current property.
* @param pstrProp [out] The name of the current property.
*/
XN_DDK_API XnStatus XnPropertySetEnumeratorGetCurrentPropertyInfo(const XnPropertySetEnumerator* pEnumerator, XnPropertyType* pnType, const XnChar** pstrModule, const XnChar** pstrProp);
/**
* Gets the current integer value.
*
* @param pEnumerator [in] The enumerator.
* @param pnValue [out] The value of the property.
*/
XN_DDK_API XnStatus XnPropertySetEnumeratorGetIntValue(const XnPropertySetEnumerator* pEnumerator, XnUInt64* pnValue);
/**
* Gets the current real property.
*
* @param pEnumerator [in] The enumerator.
* @param pdValue [out] The value of the property.
*/
XN_DDK_API XnStatus XnPropertySetEnumeratorGetRealValue(const XnPropertySetEnumerator* pEnumerator, XnDouble* pdValue);
/**
* Gets the current string property.
*
* @param pEnumerator [in] The enumerator.
* @param pstrValue [out] The value of the property.
*/
XN_DDK_API XnStatus XnPropertySetEnumeratorGetStringValue(const XnPropertySetEnumerator* pEnumerator, const XnChar** pstrValue);
/**
* Gets the current general property.
*
* @param pEnumerator [in] The enumerator.
* @param pgbValue [out] The value of the property.
*/
XN_DDK_API XnStatus XnPropertySetEnumeratorGetGeneralValue(const XnPropertySetEnumerator* pEnumerator, XnGeneralBuffer* pgbValue);
#endif //__XN_PROPERTY_SET_H__
Sensor-Stable-5.1.0.41/Include/XnPsVersion.h 0000664 0000000 0000000 00000006205 11701035512 0020411 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_PS_VERSION_H_
#define _XN_PS_VERSION_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
/** Xiron major version. */
#define XN_PS_MAJOR_VERSION 5
/** Xiron minor version. */
#define XN_PS_MINOR_VERSION 1
/** Xiron maintenance version. */
#define XN_PS_MAINTENANCE_VERSION 0
/** Xiron build version. */
#define XN_PS_BUILD_VERSION 41
/** Xiron version (in brief string format): "Major.Minor.Maintenance (Build)" */
#define XN_PS_BRIEF_VERSION_STRING \
XN_STRINGIFY(XN_PS_MAJOR_VERSION) "." \
XN_STRINGIFY(XN_PS_MINOR_VERSION) "." \
XN_STRINGIFY(XN_PS_MAINTENANCE_VERSION) \
" (Build " XN_STRINGIFY(XN_PS_BUILD_VERSION) ")"
/** Xiron version (in numeric format): (Xiron major version * 100000000 + Xiron minor version * 1000000 + Xiron maintenance version * 10000 + Xiron build version). */
#define XN_PS_VERSION (XN_PS_MAJOR_VERSION*100000000 + XN_PS_MINOR_VERSION*1000000 + XN_PS_MAINTENANCE_VERSION*10000 + XN_PS_BUILD_VERSION)
/** Xiron version (in string format): "Major.Minor.Maintenance.Build-Platform (MMM DD YYYY HH:MM:SS)". */
#define XN_PS_VERSION_STRING \
XN_PS_BRIEF_VERSION_STRING "-" \
XN_PLATFORM_STRING " (" XN_TIMESTAMP ")"
#endif //_XN_VERSION_H_
Sensor-Stable-5.1.0.41/Include/XnStream.h 0000664 0000000 0000000 00000031345 11701035512 0017717 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_STREAM_H_
#define _XN_STREAM_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#if (!defined _XN_IO_BC && !defined XN_USE_DEVICE_3_6)
#define XN_OLD_IO_API XN_API_DEPRECATED("This is old XnIO API. Please use XnVDevice instead.")
#define _XN_DEPRECATE_OLD_IO
#else
#define XN_OLD_IO_API
#endif
// some structs here that are deprecated holds other deprecated, so diable warnings
#pragma warning (push)
#pragma warning (disable: XN_DEPRECATED_WARNING_IDS)
/** The stream flag unit. */
#define XN_STREAM_FLAGS_TYPE XnInt32
/** Perform a horizontal flip on the output buffers. */
#define XN_STREAM_FLAG_MIRROR 1
#ifdef _XN_DEPRECATE_OLD_IO
#pragma deprecated ("XN_STREAM_FLAGS_TYPE", "XN_STREAM_FLAG_MIRROR")
#endif
typedef XN_OLD_IO_API enum XnAudioReadMode
{
XN_AUDIO_READ_FRAMES,
XN_AUDIO_READ_STREAM
} XnAudioReadMode;
//---------------------------------------------------------------------------
// Stream Buffer Formats
//---------------------------------------------------------------------------
/** The different types of depth buffers. */
typedef XN_OLD_IO_API enum {
/** Disable the depth buffer. */
XN_DEPTH_FORMAT_DISABLED = 0,
/** 10-bit depth values stored in a 16-bit buffer. */
XN_DEPTH_FORMAT_RAW10 = 1,
/** 12-bit depth values stored in a 16-bit buffer. */
XN_DEPTH_FORMAT_RAW12 = 2,
/** Shift values, in pixels. */
XN_DEPTH_FORMAT_SHIFTS = 3,
} XnStreamDepthFormat;
/** The different types of image buffers. */
typedef XN_OLD_IO_API enum {
/** Disable the image buffer. */
XN_IMAGE_FORMAT_DISABLED = 0,
/** Grayscale only image buffer. */
XN_IMAGE_FORMAT_GRAYSCALE8 = 1,
/** Red, Green and Blue image buffer. */
XN_IMAGE_FORMAT_RGB24 = 2,
/** YUV422 (uyvy) image buffer. */
XN_IMAGE_FORMAT_YUV422 = 3,
} XnStreamImageFormat;
/** The different types of audio buffers. */
typedef XN_OLD_IO_API enum XnStreamAudioFormat {
/** Disable the audio buffer. */
XN_AUDIO_FORMAT_DISABLED = 0,
/** PCM audio buffer. */
XN_AUDIO_FORMAT_PCM,
} XnStreamAudioFormat;
/** The different types of miscellaneous buffers. */
typedef XN_OLD_IO_API enum {
/** Disable the miscellaneous buffer. */
XN_MISC_FORMAT_DISABLED = 0,
/** 4-bit confidence map stored in an 8-bit buffer. */
XN_MISC_FORMAT_CONFIDENCE_MAP = 1
} XnStreamMiscFormat;
/** The default depth buffer format. */
#define XN_STREAM_DEFAULT_DEPTH_FORMAT XN_DEPTH_FORMAT_RAW12
/** The default image buffer format. */
#define XN_STREAM_DEFAULT_IMAGE_FORMAT XN_IMAGE_FORMAT_RGB24
/** The default miscellaneous buffer format. */
#define XN_STREAM_DEFAULT_MISC_FORMAT XN_MISC_FORMAT_CONFIDENCE_MAP
#ifdef _XN_DEPRECATE_OLD_IO
#pragma deprecated (XN_STREAM_DEFAULT_DEPTH_FORMAT, XN_STREAM_DEFAULT_IMAGE_FORMAT, XN_STREAM_DEFAULT_MISC_FORMAT)
#endif
//---------------------------------------------------------------------------
// Stream Compressions
//---------------------------------------------------------------------------
/** The different types of depth stream compression formats. */
typedef XN_OLD_IO_API enum {
/** Disable the depth buffer. */
XN_COMPRESSED_DEPTH_FORMAT_SKIP = 0,
/** Uncompressed. */
XN_COMPRESSED_DEPTH_FORMAT_UNCOMPRESSED = 1,
/** 16-bit Prime Sense Lossless Depth Compression. */
XN_COMPRESSED_DEPTH_FORMAT_16Z = 2,
/** 16-bit Prime Sense Lossless Depth Compression + embedded tables. */
XN_COMPRESSED_DEPTH_FORMAT_16ZEMBTABLE = 4,
} XnStreamDepthCompressionFormat;
/** The different types of image stream compression formats. */
typedef XN_OLD_IO_API enum {
/** Disable the image buffer. */
XN_COMPRESSED_IMAGE_FORMAT_SKIP = 0,
/** Uncompressed. */
XN_COMPRESSED_IMAGE_FORMAT_UNCOMPRESSED = 1,
/** 8-bit Prime Sense Lossless Image Compression. */
XN_COMPRESSED_IMAGE_FORMAT_8Z = 2,
/** JPEG compression (default) */
XN_COMPRESSED_IMAGE_FORMAT_JPEG = 3,
/** IR packed 10 bit */
XN_COMPRESSED_IMAGE_FORMAT_IR10 = 4,
} XnStreamImageCompressionFormat;
/** The different types of miscellaneous stream compression formats. */
typedef XN_OLD_IO_API enum {
/** Disable the miscellaneous buffer. */
XN_COMPRESSED_MISC_FORMAT_SKIP = 0,
/** Uncompressed. */
XN_COMPRESSED_MISC_FORMAT_UNCOMPRESSED = 1,
/** 4-bit Confidence map. */
XN_COMPRESSED_MISC_FORMAT_CONF4 = 2,
/** 4-bit Confidence map + simple LZ compression (UNSUPPORTED!). */
XN_COMPRESSED_MISC_FORMAT_CONF4LZ = 3
} XnStreamMiscCompressionFormat;
/** The different types of audio stream compression formats. */
typedef XN_OLD_IO_API enum {
/** Disable the audio buffer. */
XN_COMPRESSED_AUDIO_FORMAT_SKIP = 0,
/** Uncompressed. */
XN_COMPRESSED_AUDIO_FORMAT_UNCOMPRESSED = 1,
} XnStreamAudioCompressionFormat;
/** The default depth compression format. */
#define XN_STREAM_DEFAULT_DEPTH_COMPRESSION_FORMAT XN_COMPRESSED_DEPTH_FORMAT_16ZEMBTABLE
/** The default image compression format. */
#define XN_STREAM_DEFAULT_IMAGE_COMPRESSION_FORMAT XN_COMPRESSED_IMAGE_FORMAT_JPEG
/** The default misc compression format. */
#define XN_STREAM_DEFAULT_MISC_COMPRESSION_FORMAT XN_COMPRESSED_MISC_FORMAT_SKIP
/** The default audio compression format. */
#define XN_STREAM_DEFAULT_AUDIO_COMPRESSION_FORMAT XN_COMPRESSED_AUDIO_FORMAT_UNCOMPRESSED
//---------------------------------------------------------------------------
// Structures
//---------------------------------------------------------------------------
#pragma pack (push, 1)
typedef XN_OLD_IO_API struct Shift2DepthStruct
{
/** True if shift-to-depth params are available. */
XnBool bShift2DepthData;
XnUInt32 nConstShift;
XnUInt32 nPixelSizeFactor;
/** The maximum possible shift value from this device. */
XnUInt32 nMaxShiftValue;
/** The maximum possible depth from this device (as opposed to a cut-off). */
XnUInt32 nMaxDepthValue;
XnUInt32 nParamCoeff;
XnUInt32 nShiftScale;
} Shift2DepthStruct;
/**
* Describes the Xiron stream properties.
* It is defined once per opened stream and will be filled automatically by the device if empty.
*/
typedef XN_OLD_IO_API struct XnStreamProperties
{
/** A bit mask of Xiron stream flags. */
XN_STREAM_FLAGS_TYPE nStreamFlags;
/** The number of frames in this Xiron stream. */
XnUInt32 nNumOfFrames;
/** The number of frames per second. Legal values are: 15-60.*/
XnUInt8 nDepthFramesPerSecond;
XnUInt8 nImageFramesPerSecond;
/** Padding. */
XnUInt16 nReserved;
/** The depth buffer format. */
XnStreamDepthFormat DepthFormat;
/** The depth X resolution. Legal values are: 160-640 and must be a multiple of 4. */
XnUInt16 nDepthXRes;
/** The depth Y resolution. Legal values are: 120-512 and must be a multiple of 4. */
XnUInt16 nDepthYRes;
/** The depth buffer size in bytes. OpenDevice will automatically update this field to the correct size.*/
XnUInt32 nDepthBufferSize;
/** The depth buffer element size in bits. */
XnUInt32 nDepthTypeBitSize;
/** The minimum depth value in the depth buffer. */
XnDepthPixel nDepthMinValue;
/** The maximum depth value in the depth buffer. */
XnDepthPixel nDepthMaxValue;
/** The value that represents no-sample in the depth buffer. */
XnDepthPixel nDepthNoSampleValue;
/** The value that represents shadow in the depth buffer. */
XnDepthPixel nDepthShadowValue;
/** The image buffer format. */
XnStreamImageFormat ImageFormat;
/** The image X resolution. Legal values are: 160-640 and must be a multiply of 4. */
XnUInt16 nImageXRes;
/** The image Y resolution. Legal values are: 120-512 and must be a multiply of 4. */
XnUInt16 nImageYRes;
/** The image buffer size in bytes. OpenDevice will automatically update this field to the correct size.*/
XnUInt32 nImageBufferSize;
/** The image buffer element size in bits. */
XnUInt32 nImageTypeBitSize;
/** The audio buffer format. */
XnStreamAudioFormat AudioFormat;
/** The number of audio channels. */
XnUInt8 nAudioNumOfChannels;
/** Padding. */
XnUInt8 nReserved2;
XnUInt16 nReserved3;
/** The audio sample rate. */
XnSampleRate nAudioSampleRate;
/** The audio buffer size in bytes. OpenDevice will automatically update this field to the correct size.*/
XnUInt32 nAudioBufferSize;
/** Audio read mode. */
XnAudioReadMode AudioReadMode;
/** When AudioReadMode is XN_AUDIO_READ_STREAM, this member is the number of bytes that will be read each time. */
XnUInt32 nAudioReadChunkSize;
/** The miscellaneous buffer format. */
XnStreamMiscFormat MiscFormat;
/** The miscellaneous buffer size in bytes. OpenDevice will automatically update this field to the correct size.*/
XnUInt32 nMiscBufferSize;
/** The miscellaneous buffer element size in bits. */
XnUInt32 nMiscTypeBitSize;
/** The zero plane distance in depth units. */
XnDepthPixel nZeroPlaneDistance;
/** Padding. */
XnUInt16 nReserved4;
/** The zero plane pixel size */
XnFloat fZeroPlanePixelSize;
/** The distance between the emitter and the Depth Cmos */
XnFloat fEmitterDCmosDistance;
/** Information relevant for Shift2Depth */
Shift2DepthStruct Shift2DepthData;
} XnStreamProperties;
/**
* Describes the Xiron stream frame buffer that actually holds the raw data.
* Can be reused between different streams as long as it is big enough to store the data.
*/
typedef XN_OLD_IO_API struct XnStreamFrameBuffer
{
/** The stream properties that were used to create this frame buffer. */
XnStreamProperties StreamProperties;
/** A pointer to the depth buffer. */
XnDepthPixel* pDepthBuffer;
/** The depth buffer size in bytes. */
XnUInt32 nDepthBufferSize;
/** A pointer to the image buffer. */
XnUInt8* pImageBuffer;
/** The image buffer size in bytes. */
XnUInt32 nImageBufferSize;
/** A pointer to the miscellaneous buffer. */
XN_MISC_TYPE* pMiscBuffer;
/** The miscellaneous buffer size in bytes. */
XnUInt32 nMiscBufferSize;
/** A pointer to the audio buffer. */
XnUChar* pAudioBuffer;
/** The audio buffer size in bytes. */
XnUInt32 nAudioBufferSize;
/** The actual number of bytes written in the audio buffer. */
XnUInt32 nAudioWrittenBytes;
void* pInternalData;
} XnStreamFrameBuffer;
/**
* Describes the Xiron stream frame properties.
* Every single frame of the stream should have one defined.
*/
typedef XN_OLD_IO_API struct XnStreamFrameProperties
{
union
{
/** Backward compatibility - general ID equals the Depth Frame ID */
XnUInt32 nFrameID;
/** The frame id of this stream frame. */
XnInt32 nDepthFrameID;
};
XnUInt32 nImageFrameID;
union
{
/** Backward compatibility - general TimeStamp equals the Depth Frame ID */
XnUInt64 nTimeStamp;
/** The creation time of this stream frame. */
XnUInt64 nDepthTimeStamp;
};
XnUInt64 nImageTimeStamp;
/** The creation time of last audio packet in the buffer. */
XnUInt64 nAudioTimeStamp;
} XnStreamFrameProperties;
#pragma pack (pop)
#pragma warning (pop)
#endif //_XN_STREAM_H_
Sensor-Stable-5.1.0.41/Include/XnStreamData.h 0000664 0000000 0000000 00000012431 11701035512 0020504 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_STREAM_OUTPUT_H__
#define __XN_STREAM_OUTPUT_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
#include
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
struct XnStreamDataInternal; // Forward Declaration
typedef struct XnStreamDataInternal XnStreamDataInternal;
typedef enum XnStreamDataUpdateMode
{
/* Stream output object will automatically reallocate buffer if needed. */
XN_STREAM_DATA_UPDATE_AUTOMATICALLY,
/* Stream output will let the client a chance to reallocate buffer. */
XN_STREAM_DATA_UPDATE_NOTIFY,
/* Stream output will do nothing. */
XN_STREAM_DATA_UPDATE_OFF,
} XnStreamDataUpdateMode;
typedef struct XnStreamData
{
/* Name of the stream this object is related to. */
XnChar StreamName[XN_DEVICE_MAX_STRING_LENGTH];
/* Timestamp of current data. */
XnUInt64 nTimestamp;
/* Frame ID of current data. For non-frame-based streams, this value is undetermined. */
XnUInt32 nFrameID;
/* A pointer to the data itself. This pointer should be converted according to the stream. */
void* pData;
/* The number of bytes written in the data buffer. */
XnUInt32 nDataSize;
/* True when then data is new, False otherwise. */
XnBool bIsNew;
/* Internal use only. */
XnStreamDataInternal* pInternal;
} XnStreamData;
typedef void (XN_CALLBACK_TYPE* XnStreamOutputNotificationCallback)(XnStreamData* pStreamOutput, void* pCallbackData, XnUInt32 nNeededSize);
//---------------------------------------------------------------------------
// Exported Functions
//---------------------------------------------------------------------------
/**
* Creates a new stream output object.
*
* @param ppStreamOutput [out] A pointer to the newly created object.
* @param StreamName [in] The name of the stream that this buffer will be used for.
* @param nAllocSize [in] The number of bytes to allocate for the pData buffer.
*/
XN_DDK_API XnStatus XnStreamDataCreate(XnStreamData** ppStreamOutput, const XnChar* StreamName, XnUInt32 nAllocSize);
/**
* Destroys a previously created stream output object.
*
* @param ppStreamOutput [in] A previously created stream output object.
*/
XN_DDK_API XnStatus XnStreamDataDestroy(XnStreamData** ppStreamOutput);
/**
* Updates the allocated size of a stream output object.
*
* @param pStreamOutput [in] The stream output object.
* @param nAllocSize [in] The number of bytes to allocate for the pData buffer.
*/
XN_DDK_API XnStatus XnStreamDataUpdateSize(XnStreamData* pStreamOutput, XnUInt32 nAllocSize);
/**
* Sets the update mode of a stream output object.
*
* @param pStreamOutput [in] A stream output object.
* @param UpdateMode [in] The update mode to use.
* @param Callback [in] A callback to call when an update is required. if update mode is not NOTIFY, this can be null.
* @param pCallbackData [in] [Optional] Data to be passed to the callback function.
*/
XN_DDK_API XnStatus XnStreamDataSetUpdateMode(XnStreamData* pStreamOutput, XnStreamDataUpdateMode UpdateMode, XnStreamOutputNotificationCallback Callback, void* pCallbackData);
/**
* Checks if the stream output object has enough space for data.
*
* @param pStreamOutput [in] A stream output object.
* @param nNeededSize [in] The number of needed bytes.
*/
XN_DDK_API XnStatus XnStreamDataCheckSize(XnStreamData* pStreamOutput, XnUInt32 nNeededSize);
#endif //__XN_STREAM_OUTPUT_H__ Sensor-Stable-5.1.0.41/Include/XnStreamDataSet.h 0000664 0000000 0000000 00000010672 11701035512 0021165 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_STREAM_OUTPUT_SET_H__
#define __XN_STREAM_OUTPUT_SET_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
struct XnStreamDataSet; // Forward Declaration
typedef struct XnStreamDataSet XnStreamDataSet;
//---------------------------------------------------------------------------
// Exported Functions
//---------------------------------------------------------------------------
/**
* Creates a new stream output set object.
*
* @param ppStreamOutputSet [out] A pointer to the newly created object.
*/
XN_DDK_API XnStatus XnStreamDataSetCreate(XnStreamDataSet** ppStreamOutputSet);
/**
* Destroys a previously created stream output set object.
*
* @param ppStreamOutputSet [in] A previously created stream output set object.
*/
XN_DDK_API XnStatus XnStreamDataSetDestroy(XnStreamDataSet** ppStreamOutputSet);
/**
* Adds a stream output object to the set. A set cannot contain more than one stream output for the same stream.
*
* @param pStreamOutputSet [in] The set.
* @param pStreamOutput [in] A stream output object to add to the set
*/
XN_DDK_API XnStatus XnStreamDataSetAdd(XnStreamDataSet* pStreamOutputSet, XnStreamData* pStreamOutput);
/**
* Removes a stream output object from the set.
*
* @param pStreamOutputSet [in] The set.
* @param pStreamOutput [in] The stream output set to remove.
*/
XN_DDK_API XnStatus XnStreamDataSetRemove(XnStreamDataSet* pStreamOutputSet, XnStreamData* pStreamOutput);
/**
* Removes a stream output object from the set, by name.
*
* @param pStreamOutputSet [in] The set.
* @param StreamName [in] The stream which its object should be removed.
*/
XN_DDK_API XnStatus XnStreamDataSetRemoveByName(XnStreamDataSet* pStreamOutputSet, const XnChar* StreamName);
/**
* Gets a stream output object from the set by the name of its stream.
*
* @param pStreamOutputSet [in] The set.
* @param StreamName [in] The stream name.
* @param ppStreamOutput [out] The stream output object related to that stream.
*/
XN_DDK_API XnStatus XnStreamDataSetGet(XnStreamDataSet* pStreamOutputSet, const XnChar* StreamName, XnStreamData** ppStreamOutput);
/**
* Gets the set as an array of pointers to objects.
*
* @param pStreamOutputSet [in] The set.
* @param apStreamOutputs [out] An array of pointers to be filled.
* @param pnCount [in/out] The size of the array.
*/
XN_DDK_API XnStatus XnStreamDataSetCopyToArray(const XnStreamDataSet* pStreamOutputSet, XnStreamData** apStreamOutputs, XnUInt32* pnCount);
#endif //__XN_STREAM_OUTPUT_SET_H__
Sensor-Stable-5.1.0.41/Include/XnStreamFormats.h 0000664 0000000 0000000 00000007133 11701035512 0021251 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef __XN_STREAM_FORMATS_H__
#define __XN_STREAM_FORMATS_H__
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
#include
//---------------------------------------------------------------------------
// Pixel Types
//---------------------------------------------------------------------------
/** The basic depth buffer unit. */
//#define XN_DEPTH_TYPE XnUInt16
/** The basic image buffer unit. */
//#define XN_IMAGE_TYPE XnUInt8
/** The basic miscellaneous buffer unit. */
#define XN_MISC_TYPE XnUInt8
/** The basic audio buffer unit. */
#define XN_AUDIO_TYPE XnUInt8
/** The miscellaneous confidence map buffer unit. */
#define XN_MISC_CONF_TYPE XnUInt8
//---------------------------------------------------------------------------
// Formats
//---------------------------------------------------------------------------
/** The different types of stream outputs. */
typedef enum
{
XN_OUTPUT_FORMAT_SHIFT_VALUES = 0,
XN_OUTPUT_FORMAT_DEPTH_VALUES = 1,
XN_OUTPUT_FORMAT_GRAYSCALE8 = 2,
XN_OUTPUT_FORMAT_GRAYSCALE16 = 3,
XN_OUTPUT_FORMAT_YUV422 = 4,
XN_OUTPUT_FORMAT_RGB24 = 5,
XN_OUTPUT_FORMAT_JPEG = 6,
XN_OUTPUT_FORMAT_PCM = 7,
XN_OUTPUT_FORMATS_COUNT,
} XnOutputFormats;
typedef enum
{
/** Data is stored uncompressed. */
XN_COMPRESSION_NONE = 0,
/** Data is compressed using PS lossless 16-bit depth compression. */
XN_COMPRESSION_16Z = 1,
/** Data is compressed using PS lossless 16-bit depth compression with embedded tables. */
XN_COMPRESSION_16Z_EMB_TABLE = 2,
/** Data is compressed using PS lossless 8-bit image compression (for grayscale). */
XN_COMPRESSION_COLOR_8Z = 3,
/** Data is compressed using JPEG. */
XN_COMPRESSION_JPEG = 4,
/** Data is packed in 10-bit values. */
XN_COMPRESSION_10BIT_PACKED = 5,
} XnCompressionFormats;
#endif //__XN_STREAM_FORMATS_H__ Sensor-Stable-5.1.0.41/Include/XnStreamParams.h 0000664 0000000 0000000 00000047720 11701035512 0021067 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
#ifndef _XN_STREAM_PARAMS_H_
#define _XN_STREAM_PARAMS_H_
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include
//---------------------------------------------------------------------------
// Types
//---------------------------------------------------------------------------
/** The maximum permitted Xiron device name string length. */
#define XN_DEVICE_MAX_STRING_LENGTH 200
//---------------------------------------------------------------------------
// Modules Names
//---------------------------------------------------------------------------
#define XN_MODULE_NAME_DEVICE "Device"
#define XN_MODULE_NAME_FIXED_PARAMS "FixedParams"
#define XN_MODULE_NAME_SHIFTS "Shifts"
#ifndef XN_USE_DEVICE_3_6
#pragma deprecated ("XN_MODULE_NAME_FIXED_PARAMS", "XN_MODULE_NAME_SHIFTS")
#endif
//---------------------------------------------------------------------------
// Streams Types
//---------------------------------------------------------------------------
#define XN_STREAM_TYPE_DEPTH "Depth"
#define XN_STREAM_TYPE_IMAGE "Image"
#define XN_STREAM_TYPE_IR "IR"
#define XN_STREAM_TYPE_AUDIO "Audio"
//---------------------------------------------------------------------------
// Streams Names
//---------------------------------------------------------------------------
#define XN_STREAM_NAME_DEPTH XN_STREAM_TYPE_DEPTH
#define XN_STREAM_NAME_IMAGE XN_STREAM_TYPE_IMAGE
#define XN_STREAM_NAME_IR XN_STREAM_TYPE_IR
#define XN_STREAM_NAME_AUDIO XN_STREAM_TYPE_AUDIO
//---------------------------------------------------------------------------
// General Properties
//---------------------------------------------------------------------------
#define XN_STREAM_PROPERTY_TYPE "Type"
#define XN_STREAM_PROPERTY_IS_STREAM "IsStream"
#define XN_STREAM_PROPERTY_IS_FRAME_BASED "IsFrameBased"
#define XN_STREAM_PROPERTY_IS_PIXEL_BASED "IsPixelBased"
#define XN_STREAM_PROPERTY_IS_STREAMING "IsStreaming"
/** Integer */
#define XN_MODULE_PROPERTY_LOCK "Lock"
//---------------------------------------------------------------------------
// General Stream Properties
//---------------------------------------------------------------------------
/** Integer */
#define XN_STREAM_PROPERTY_STATE "State"
/** Integer */
#define XN_STREAM_PROPERTY_REQUIRED_DATA_SIZE "RequiredDataSize"
/** Integer */
#define XN_STREAM_PROPERTY_FRAME_ID "FrameId"
/** Integer */
#define XN_STREAM_PROPERTY_TIMESTAMP "Timestamp"
/** Integer */
#define XN_STREAM_PROPERTY_IS_NEW_DATA "IsNew"
/** Integer (XnOutputFormats)*/
#define XN_STREAM_PROPERTY_OUTPUT_FORMAT "OutputFormat"
/** General (void*) */
#define XN_STREAM_PROPERTY_BUFFER "Buffer"
/** Integer */
#define XN_STREAM_PROPERTY_BUFFER_SIZE "BufferSize"
/** Integer */
#define XN_STREAM_PROPERTY_COMPRESSION "Compression"
/** String */
#define XN_STREAM_PROPERTY_SHARED_BUFFER_NAME "SharedBufferName"
/** Boolean */
#define XN_STREAM_PROPERTY_ACTUAL_READ_DATA "ActualReadData"
/** Integer */
#define XN_STREAM_PROPERTY_BUFFER_ALLOCATED_SIZE XN_STREAM_PROPERTY_REQUIRED_DATA_SIZE
#ifndef USE_DEVICE_3_6
#pragma deprecated ("XN_STREAM_PROPERTY_BUFFER_ALLOCATED_SIZE")
#endif
//---------------------------------------------------------------------------
// Frame-Based Stream Properties (Depth, Image, IR)
//---------------------------------------------------------------------------
/** Integer */
#define XN_STREAM_PROPERTY_FPS "FPS"
/** Integer */
#define XN_STREAM_PROPERTY_NUMBER_OF_FRAMES "NumberOfFrames"
/** Integer */
#define XN_STREAM_PROPERTY_INPUT_FORMAT "InputFormat"
/** XnDynamicSizeBuffer */
#define XN_STREAM_PROPERTY_LAST_RAW_FRAME "LastRawFrame"
//---------------------------------------------------------------------------
// Pixel-Based Stream Properties (Depth, Image, IR)
//---------------------------------------------------------------------------
/** XnResolutions */
#define XN_STREAM_PROPERTY_RESOLUTION "Resolution"
/** Integer */
#define XN_STREAM_PROPERTY_X_RES "XRes"
/** Integer */
#define XN_STREAM_PROPERTY_Y_RES "YRes"
/** Integer */
#define XN_STREAM_PROPERTY_BYTES_PER_PIXEL "BytesPerPixel"
/** XnCropping */
#define XN_STREAM_PROPERTY_CROPPING "Cropping"
/** Boolean */
#define XN_STREAM_PROPERTY_WHITE_BALANCE_ENABLED "WhiteBalancedEnabled"
/** Integer */
#define XN_STREAM_PROPERTY_GAIN "Gain"
/** Integer */
#define XN_STREAM_PROPERTY_SUPPORT_MODES_COUNT "SupportedModesCount"
/** General (XnCmosPreset array) */
#define XN_STREAM_PROPERTY_SUPPORT_MODES "SupportedModes"
//---------------------------------------------------------------------------
// Depth Specific Properties
//---------------------------------------------------------------------------
/** Integer */
#define XN_STREAM_PROPERTY_HOLE_FILTER "HoleFilter"
/** Integer */
#define XN_STREAM_PROPERTY_MIN_DEPTH "MinDepthValue"
/** Integer */
#define XN_STREAM_PROPERTY_MAX_DEPTH "MaxDepthValue"
/** Integer */
#define XN_STREAM_PROPERTY_SHADOW "ShadowValue"
/** Integer */
#define XN_STREAM_PROPERTY_NO_SAMPLE "NoSampleValue"
/** Boolean */
#define XN_STREAM_PROPERTY_REGISTRATION "Registration"
/** XnProcessingType */
#define XN_STREAM_PROPERTY_REGISTRATION_TYPE "RegistrationType"
/** XnDepthAGCBin* */
#define XN_STREAM_PROPERTY_AGC_BIN "AGCBin"
/** Integer */
#define XN_STREAM_PROPERTY_CONST_SHIFT "ConstShift"
/** Integer */
#define XN_STREAM_PROPERTY_PIXEL_SIZE_FACTOR "PixelSizeFactor"
/** Integer */
#define XN_STREAM_PROPERTY_MAX_SHIFT "MaxShift"
/** Integer */
#define XN_STREAM_PROPERTY_PARAM_COEFF "ParamCoeff"
/** Integer */
#define XN_STREAM_PROPERTY_SHIFT_SCALE "ShiftScale"
/** XN_DEPTH_TYPE[] */
#define XN_STREAM_PROPERTY_S2D_TABLE "S2D"
/** XnUInt16[] */
#define XN_STREAM_PROPERTY_D2S_TABLE "D2S"
/** Integer */
#define XN_STREAM_PROPERTY_DEVICE_MAX_DEPTH "DeviceMaxDepth"
/** XN_DEPTH_TYPE */
#define XN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE "ZPD"
/** Real */
#define XN_STREAM_PROPERTY_ZERO_PLANE_PIXEL_SIZE "ZPPS"
/** Real */
#define XN_STREAM_PROPERTY_EMITTER_DCMOS_DISTANCE "LDDIS"
/** Real */
#define XN_STREAM_PROPERTY_DCMOS_RCMOS_DISTANCE "DCRCDIS"
/** Boolean */
#define XN_STREAM_PROPERTY_GMC_MODE "GmcMode"
//---------------------------------------------------------------------------
// Shifts Properties (up to v3.6)
//---------------------------------------------------------------------------
/** Integer */
#define XN_MODULE_PROPERTY_CONST_SHIFT XN_STREAM_PROPERTY_CONST_SHIFT
/** Integer */
#define XN_MODULE_PROPERTY_PIXEL_SIZE_FACTOR XN_STREAM_PROPERTY_PIXEL_SIZE_FACTOR
/** Integer */
#define XN_MODULE_PROPERTY_MAX_SHIFT XN_STREAM_PROPERTY_MAX_SHIFT
/** Integer */
#define XN_MODULE_PROPERTY_PARAM_COEFF XN_STREAM_PROPERTY_PARAM_COEFF
/** Integer */
#define XN_MODULE_PROPERTY_SHIFT_SCALE XN_STREAM_PROPERTY_SHIFT_SCALE
/** XN_DEPTH_TYPE[] */
#define XN_MODULE_PROPERTY_S2D_TABLE XN_STREAM_PROPERTY_S2D_TABLE
/** XnUInt16[] */
#define XN_MODULE_PROPERTY_D2S_TABLE XN_STREAM_PROPERTY_D2S_TABLE
#ifndef XN_USE_DEVICE_3_6
#pragma deprecated ("XN_MODULE_PROPERTY_CONST_SHIFT", "XN_MODULE_PROPERTY_PIXEL_SIZE_FACTOR", "XN_MODULE_PROPERTY_MAX_SHIFT")
#pragma deprecated ("XN_MODULE_PROPERTY_PARAM_COEFF", "XN_MODULE_PROPERTY_SHIFT_SCALE")
#pragma deprecated ("XN_MODULE_PROPERTY_S2D_TABLE", "XN_MODULE_PROPERTY_D2S_TABLE")
#endif
//---------------------------------------------------------------------------
// FixedParams Properties (up to v3.6)
//---------------------------------------------------------------------------
/** XN_DEPTH_TYPE */
#define XN_MODULE_PROPERTY_ZERO_PLANE_DISTANCE XN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE
/** Real */
#define XN_MODULE_PROPERTY_ZERO_PLANE_PIXEL_SIZE XN_STREAM_PROPERTY_ZERO_PLANE_PIXEL_SIZE
/** Real */
#define XN_MODULE_PROPERTY_EMITTER_DCMOS_DISTANCE XN_STREAM_PROPERTY_EMITTER_DCMOS_DISTANCE
#ifndef XN_USE_DEVICE_3_6
#pragma deprecated ("XN_MODULE_PROPERTY_ZERO_PLANE_DISTANCE", "XN_MODULE_PROPERTY_ZERO_PLANE_PIXEL_SIZE", "XN_MODULE_PROPERTY_EMITTER_DCMOS_DISTANCE")
#endif
//---------------------------------------------------------------------------
// Image Specific Properties
//---------------------------------------------------------------------------
/** Integer */
#define XN_STREAM_PROPERTY_FLICKER "Flicker"
/** Integer */
#define XN_STREAM_PROPERTY_QUALITY "Quality"
/** Float */
#define XN_STREAM_PROPERTY_BRIGHTNESS XN_CAPABILITY_BRIGHTNESS
/** Float */
#define XN_STREAM_PROPERTY_CONTRAST XN_CAPABILITY_CONTRAST
/** Float */
#define XN_STREAM_PROPERTY_SATURATION XN_CAPABILITY_SATURATION
/** Float */
#define XN_STREAM_PROPERTY_SHARPNESS XN_CAPABILITY_SHARPNESS
/** Float */
#define XN_STREAM_PROPERTY_COLOR_TEMPERATURE XN_CAPABILITY_COLOR_TEMPERATURE
/** Float */
#define XN_STREAM_PROPERTY_BACKLIGHT_COMPENSATION XN_CAPABILITY_BACKLIGHT_COMPENSATION
/** Float */
#define XN_STREAM_PROPERTY_ZOOM XN_CAPABILITY_ZOOM
/** Integer (in microseconds) */
#define XN_STREAM_PROPERTY_EXPOSURE XN_CAPABILITY_EXPOSURE
/** Float */
#define XN_STREAM_PROPERTY_PAN XN_CAPABILITY_PAN
/** Float */
#define XN_STREAM_PROPERTY_TILT XN_CAPABILITY_TILT
/** Boolean */
#define XN_STREAM_PROPERTY_LOW_LIGHT_COMPENSATION XN_CAPABILITY_LOW_LIGHT_COMPENSATION
//---------------------------------------------------------------------------
// Audio Specific Properties
//---------------------------------------------------------------------------
/** XnSampleRate */
#define XN_STREAM_PROPERTY_SAMPLE_RATE "SampleRate"
/** Integer */
#define XN_STREAM_PROPERTY_LEFT_CHANNEL_VOLUME "LeftChannelVolume"
/** Integer */
#define XN_STREAM_PROPERTY_RIGHT_CHANNEL_VOLUME "RightChannelVolume"
/** Integer */
#define XN_STREAM_PROPERTY_NUMBER_OF_CHANNELS "NumOfChannels"
/** Boolean */
#define XN_STREAM_PROPERTY_IS_STEREO "IsStereo"
/** Integer */
#define XN_STREAM_PROPERTY_READ_MODE "ReadMode"
/** Integer */
#define XN_STREAM_PROPERTY_READ_CHUNK_SIZE "ReadChunkSize"
/** Integer */
#define XN_STREAM_PROPERTY_READ_SYNC "AudioReadSync"
#ifndef XN_USE_DEVICE_3_6
#pragma deprecated ("XN_STREAM_PROPERTY_READ_MODE", "XN_STREAM_PROPERTY_READ_SYNC")
#endif
//---------------------------------------------------------------------------
// DeviceParams Properties
//---------------------------------------------------------------------------
/** XnSDKVersion */
#define XN_MODULE_PROPERTY_SDK_VERSION "SDKVersion"
/** String */
#define XN_MODULE_PROPERTY_DEVICE_NAME "DeviceName"
/** String */
#define XN_MODULE_PROPERTY_USB_PATH "USBPath"
/** Integer (XnSensorUsbInterface) */
#define XN_MODULE_PROPERTY_USB_INTERFACE "UsbInterface"
/** Integer */
#define XN_MODULE_PROPERTY_NUMBER_OF_BUFFERS "NumberOfBuffers"
/** Boolean */
#define XN_MODULE_PROPERTY_READ_ENDPOINT_1 "ReadEndpoint1"
/** Boolean */
#define XN_MODULE_PROPERTY_READ_ENDPOINT_2 "ReadEndpoint2"
/** Boolean */
#define XN_MODULE_PROPERTY_READ_ENDPOINT_3 "ReadEndpoint3"
/** Boolean */
#define XN_MODULE_PROPERTY_RESET_SENSOR_ON_STARTUP "ResetSensorOnStartup"
/** String */
#define XN_MODULE_PROPERTY_ID "ID"
/** String */
#define XN_MODULE_PROPERTY_PRIMARY_STREAM "PrimaryStream"
/** Boolean */
#define XN_MODULE_PROPERTY_MIRROR "Mirror"
/** Boolean */
#define XN_MODULE_PROPERTY_READ_DATA "ReadData"
/** Integer */
#define XN_MODULE_PROPERTY_READ_WRITE_MODE "ReadWriteMode"
/** Integer */
#define XN_MODULE_PROPERTY_SHARE_MODE "ShareMode"
/** Boolean */
#define XN_MODULE_PROPERTY_FRAME_DELAY "FrameDelay"
/** Boolean */
#define XN_MODULE_PROPERTY_FRAME_SYNC "FrameSync"
/** XnCmosBlankingUnits */
#define XN_MODULE_PROPERTY_CMOS_BLANKING_UNITS "CmosBlankingUnits"
/** XnCmosBlankingTime */
#define XN_MODULE_PROPERTY_CMOS_BLANKING_TIME "CmosBlankingTime"
/** XnInnerParam */
#define XN_MODULE_PROPERTY_FIRMWARE_PARAM "FirmwareParam"
/** XnVersions */
#define XN_MODULE_PROPERTY_VERSION "Version"
/* XnDynamicSizeBuffer */
#define XN_MODULE_PROPERTY_FIXED_PARAMS "FixedParams"
/** Integer */
#define XN_MODULE_PROPERTY_RESET "Reset"
/** Integer */
#define XN_MODULE_PROPERTY_FIRMWARE_MODE "FirmwareMode"
/** Boolean */
#define XN_MODULE_PROPERTY_HIGH_RES_TIMESTAMPS "HighResTimestamps"
/** Boolean */
#define XN_MODULE_PROPERTY_CLOSE_STREAMS_ON_SHUTDOWN "CloseStreamsOnShutdown"
/** Integer */
#define XN_MODULE_PROPERTY_SERVER_NO_CLIENTS_TIMEOUT "ServerNoClientsTimeout"
/** Integer */
#define XN_MODULE_PROPERTY_SERVER_START_NEW_LOG_FILE "ServerStartNewLogFile"
/** Integer */
#define XN_MODULE_PROPERTY_ERROR_STATE "ErrorState"
/** Boolean */
#define XN_MODULE_PROPERTY_ENABLE_MULTI_PROCESS "EnableMultiProcess"
/** Boolean */
#define XN_MODULE_PROPERTY_ENABLE_MULTI_USERS "EnableMultiUsers"
/** String */
#define XN_MODULE_PROPERTY_PHYSICAL_DEVICE_NAME "PhysicalDeviceName"
/** String */
#define XN_MODULE_PROPERTY_VENDOR_SPECIFIC_DATA "VendorSpecificData"
/** Boolean */
#define XN_MODULE_PROPERTY_AUDIO_SUPPORTED "AudioSupported"
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
#define XN_PRIMARY_STREAM_ANY "Any"
#define XN_PRIMARY_STREAM_NONE "None"
#define XN_MAX_LOG_SIZE (6*1024)
#define XN_GAIN_AUTO 0U
#define XN_QVGA_X_RES 320
#define XN_QVGA_Y_RES 240
#define XN_VGA_X_RES 640
#define XN_VGA_Y_RES 480
#define XN_SXGA_X_RES 1280
#define XN_SXGA_Y_RES 1024
#define XN_UXGA_X_RES 1600
#define XN_UXGA_Y_RES 1200
//---------------------------------------------------------------------------
// Enums - values of various properties
//---------------------------------------------------------------------------
typedef enum XnResolutions
{
XN_RESOLUTION_CUSTOM = -1,
XN_RESOLUTION_QVGA = 0, // 320x240
XN_RESOLUTION_VGA = 1, // 640x480
XN_RESOLUTION_SXGA = 2, // 1280x1024
XN_RESOLUTION_UXGA = 3, // 1600x1200
XN_RESOLUTION_QQVGA = 4, // 160x120
XN_RESOLUTION_QCIF = 5, // 176x144
XN_RESOLUTION_240P = 6, // 432x240
XN_RESOLUTION_CIF = 7, // 352x288
XN_RESOLUTION_WVGA = 8, // 640x360
XN_RESOLUTION_480P = 9, // 864x480
XN_RESOLUTION_800_448 = 10, // 800x448
XN_RESOLUTION_SVGA = 11, // 800x600
XN_RESOLUTION_576P = 12, // 1024x576
XN_RESOLUTION_DV = 13, // 960x720
XN_RESOLUTION_720P = 14, // 1280x720
XN_RESOLUTION_1280_960 = 15, // 1280x960
} XnResolutions;
typedef enum
{
XN_SENSOR_FW_VER_UNKNOWN = 0,
XN_SENSOR_FW_VER_0_17 = 1,
XN_SENSOR_FW_VER_1_1 = 2,
XN_SENSOR_FW_VER_1_2 = 3,
XN_SENSOR_FW_VER_3_0 = 4,
XN_SENSOR_FW_VER_4_0 = 5,
XN_SENSOR_FW_VER_5_0 = 6,
XN_SENSOR_FW_VER_5_1 = 7,
XN_SENSOR_FW_VER_5_2 = 8,
XN_SENSOR_FW_VER_5_3 = 9,
XN_SENSOR_FW_VER_5_4 = 10,
XN_SENSOR_FW_VER_5_5 = 11,
XN_SENSOR_FW_VER_5_6 = 12,
} XnFWVer;
typedef enum
{
XN_MODE_PS = 0,
XN_MODE_MAINTENANCE = 1,
XN_MODE_SAFE_MODE = 2,
} XnParamCurrentMode;
typedef enum {
XN_SENSOR_VER_UNKNOWN = 0,
XN_SENSOR_VER_2_0 = 1,
XN_SENSOR_VER_3_0 = 2,
XN_SENSOR_VER_4_0 = 3,
XN_SENSOR_VER_5_0 = 4
} XnSensorVer;
typedef enum {
XN_SENSOR_HW_VER_UNKNOWN = 0,
XN_SENSOR_HW_VER_FPDB_10 = 1,
XN_SENSOR_HW_VER_CDB_10 = 2,
XN_SENSOR_HW_VER_RD_3 = 3,
XN_SENSOR_HW_VER_RD_5 = 4
} XnHWVer;
typedef enum {
XN_SENSOR_CHIP_VER_UNKNOWN = 0,
XN_SENSOR_CHIP_VER_PS1000 = 1,
XN_SENSOR_CHIP_VER_PS1080 = 2
} XnChipVer;
typedef enum
{
XN_CMOS_TYPE_IMAGE = 0,
XN_CMOS_TYPE_DEPTH = 1,
XN_CMOS_COUNT
} XnCMOSType;
typedef enum
{
XN_IO_IMAGE_FORMAT_BAYER = 0,
XN_IO_IMAGE_FORMAT_YUV422 = 1,
XN_IO_IMAGE_FORMAT_JPEG = 2,
XN_IO_IMAGE_FORMAT_JPEG_420 = 3,
XN_IO_IMAGE_FORMAT_JPEG_MONO = 4,
XN_IO_IMAGE_FORMAT_UNCOMPRESSED_YUV422 = 5,
XN_IO_IMAGE_FORMAT_UNCOMPRESSED_BAYER = 6,
XN_IO_IMAGE_FORMAT_UNCOMPRESSED_GRAY8 = 7,
} XnIOImageFormats;
typedef enum
{
XN_IO_DEPTH_FORMAT_UNCOMPRESSED_16_BIT = 0,
XN_IO_DEPTH_FORMAT_COMPRESSED_PS = 1,
XN_IO_DEPTH_FORMAT_UNCOMPRESSED_10_BIT = 2,
XN_IO_DEPTH_FORMAT_UNCOMPRESSED_11_BIT = 3,
XN_IO_DEPTH_FORMAT_UNCOMPRESSED_12_BIT = 4,
} XnIODepthFormats;
typedef enum
{
XN_VIDEO_STREAM_OFF = 0,
XN_VIDEO_STREAM_COLOR = 1,
XN_VIDEO_STREAM_DEPTH = 2,
XN_VIDEO_STREAM_IR = 3,
} XnVideoStreamMode;
typedef enum
{
XN_AUDIO_STREAM_OFF = 0,
XN_AUDIO_STREAM_ON = 1,
} XnAudioStreamMode;
typedef enum
{
XN_RESET_TYPE_POWER = 0,
XN_RESET_TYPE_SOFT = 1,
XN_RESET_TYPE_SOFT_FIRST = 2,
} XnParamResetType;
typedef enum XnSensorUsbInterface
{
XN_SENSOR_USB_INTERFACE_DEFAULT = 0,
XN_SENSOR_USB_INTERFACE_ISO_ENDPOINTS = 1,
XN_SENSOR_USB_INTERFACE_BULK_ENDPOINTS = 2,
} XnSensorUsbInterface;
typedef enum XnProcessingType
{
XN_PROCESSING_DONT_CARE = 0,
XN_PROCESSING_HARDWARE = 1,
XN_PROCESSING_SOFTWARE = 2,
} XnProcessingType;
//---------------------------------------------------------------------------
// Data Structures - structures that are arguments to properties
//---------------------------------------------------------------------------
#pragma pack (push, 1)
typedef struct XnSDKVersion
{
XnUInt8 nMajor;
XnUInt8 nMinor;
XnUInt8 nMaintenance;
XnUInt16 nBuild;
} XnSDKVersion;
typedef struct {
XnUInt8 nMajor;
XnUInt8 nMinor;
XnUInt16 nBuild;
XnUInt32 nChip;
XnUInt16 nFPGA;
XnUInt16 nSystemVersion;
XnSDKVersion SDK;
XnHWVer HWVer;
XnFWVer FWVer;
XnSensorVer SensorVer;
XnChipVer ChipVer;
} XnVersions;
typedef struct
{
XnUInt16 nParam;
XnUInt16 nValue;
} XnInnerParamData;
typedef struct XnCmosBlankingTime
{
XnCMOSType nCmosID;
XnFloat nTimeInMilliseconds;
XnUInt16 nNumberOfFrames;
} XnCmosBlankingTime;
typedef struct XnCmosBlankingUnits
{
XnCMOSType nCmosID;
XnUInt16 nUnits;
XnUInt16 nNumberOfFrames;
} XnCmosBlankingUnits;
typedef struct XnDepthAGCBin
{
XnUInt16 nBin;
XnUInt16 nMin;
XnUInt16 nMax;
} XnDepthAGCBin;
typedef struct XnDynamicSizeBuffer
{
void* pData;
XnUInt32 nMaxSize;
XnUInt32 nDataSize;
} XnDynamicSizeBuffer;
typedef struct XnCmosPreset
{
XnUInt16 nFormat;
XnUInt16 nResolution;
XnUInt16 nFPS;
} XnCmosPreset;
#pragma pack (pop)
#endif // _XN_STREAM_PARAMS_H_
Sensor-Stable-5.1.0.41/LGPL.txt 0000664 0000000 0000000 00000017210 11701035512 0015714 0 ustar 00root root 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
Sensor-Stable-5.1.0.41/Platform/ 0000775 0000000 0000000 00000000000 11701035512 0016200 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Android/ 0000775 0000000 0000000 00000000000 11701035512 0017560 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Android/jni/ 0000775 0000000 0000000 00000000000 11701035512 0020340 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Android/jni/Android.mk 0000664 0000000 0000000 00000000141 11701035512 0022245 0 ustar 00root root 0000000 0000000 # OpenNI Android makefile.
#
include $(call all-subdir-makefiles)
$(call import-module,OpenNI)
Sensor-Stable-5.1.0.41/Platform/Android/jni/Application.mk 0000664 0000000 0000000 00000001314 11701035512 0023133 0 ustar 00root root 0000000 0000000 APP_STL := gnustl_static
# Android >= v2.3
APP_PLATFORM := android-9
# Build ARMv7-A machine code.
APP_ABI := armeabi-v7a
APP_CFLAGS := -O3 -ftree-vectorize -ffast-math -funroll-loops
APP_CFLAGS += -fPIC
ifeq ($(APP_ABI),armeabi-v7a)
APP_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mtune=cortex-a9 -mfp=vfpv3-d16 -mfpu=vfp
# optionally add NEON to compilation flags.
# to activate, run: "ndk-build USE_NEON=1"
ifdef USE_NEON
$(call __ndk_info,Building everything with NEON support!)
APP_CFLAGS += -mfpu=neon -DHAVE_NEON=1 -flax-vector-conversions
endif
endif
APP_CPPFLAGS += -frtti
#$(call __ndk_info,APP_CFLAGS=$(APP_CFLAGS))
#$(call __ndk_info,APP_CPPFLAGS=$(APP_CPPFLAGS))
#-fsingle-precision-constant
Sensor-Stable-5.1.0.41/Platform/Android/jni/XnCore/ 0000775 0000000 0000000 00000000000 11701035512 0021536 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Android/jni/XnCore/Android.mk 0000664 0000000 0000000 00000001351 11701035512 0023447 0 ustar 00root root 0000000 0000000 # XnCore Android makefile.
# libXnCore.so
#
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# set path to source
MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnCore/
# list all source files
MY_SRC_FILES := \
$(MY_PREFIX)*.cpp
# expand the wildcards
MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES))
# make those paths relative to here
LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../../Include/ \
$(LOCAL_PATH)/../../../../Source/ \
LOCAL_CFLAGS:= -fvisibility=hidden -DXN_CORE_EXPORTS
LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker
LOCAL_SHARED_LIBRARIES := OpenNI libusb
LOCAL_PREBUILT_LIBS := libc
LOCAL_MODULE := XnCore
include $(BUILD_SHARED_LIBRARY)
Sensor-Stable-5.1.0.41/Platform/Android/jni/XnDDK/ 0000775 0000000 0000000 00000000000 11701035512 0021250 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Android/jni/XnDDK/Android.mk 0000664 0000000 0000000 00000001444 11701035512 0023164 0 ustar 00root root 0000000 0000000 # XnDDK Android makefile.
# libXnDDK.so
#
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# set path to source
MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnDDK/
# list all source files
MY_SRC_FILES := \
$(MY_PREFIX)*.cpp
# expand the wildcards
MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES))
# make those paths relative to here
LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../../Include/ \
$(LOCAL_PATH)/../../../../Source/ \
$(LOCAL_PATH)/../../../../Source/XnCommon \
LOCAL_CFLAGS := -fvisibility=hidden -DXN_DDK_EXPORTS
LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker
LOCAL_SHARED_LIBRARIES := OpenNI libusb XnCore XnFormats
LOCAL_PREBUILT_LIBS := libc
LOCAL_MODULE := XnDDK
include $(BUILD_SHARED_LIBRARY)
Sensor-Stable-5.1.0.41/Platform/Android/jni/XnDeviceFile/ 0000775 0000000 0000000 00000000000 11701035512 0022645 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Android/jni/XnDeviceFile/Android.mk 0000664 0000000 0000000 00000001511 11701035512 0024554 0 ustar 00root root 0000000 0000000 # XnDeviceFile Android makefile.
# libXnDeviceFile.so
#
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# set path to source
MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnDeviceFile/
# list all source files
MY_SRC_FILES := \
$(MY_PREFIX)*.cpp
# expand the wildcards
MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES))
# make those paths relative to here
LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../../Include/ \
$(LOCAL_PATH)/../../../../Source/ \
$(LOCAL_PATH)/../../../../Source/XnCommon \
LOCAL_CFLAGS := -fvisibility=hidden -DXN_DEVICE_EXPORTS
LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker
LOCAL_SHARED_LIBRARIES := OpenNI libusb XnCore XnFormats XnDDK
LOCAL_PREBUILT_LIBS := libc
LOCAL_MODULE := XnDeviceFile
include $(BUILD_SHARED_LIBRARY)
Sensor-Stable-5.1.0.41/Platform/Android/jni/XnDeviceSensorV2/ 0000775 0000000 0000000 00000000000 11701035512 0023447 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Android/jni/XnDeviceSensorV2/Android.mk 0000664 0000000 0000000 00000001531 11701035512 0025360 0 ustar 00root root 0000000 0000000 # XnDeviceSensorV2 Android makefile.
# libXnDeviceSensorV2.so
#
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# set path to source
MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnDeviceSensorV2/
# list all source files
MY_SRC_FILES := \
$(MY_PREFIX)*.cpp
# expand the wildcards
MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES))
# make those paths relative to here
LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../../Include/ \
$(LOCAL_PATH)/../../../../Source/ \
$(LOCAL_PATH)/../../../../Source/XnCommon \
LOCAL_CFLAGS := -fvisibility=hidden -DXN_DEVICE_EXPORTS
LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker
LOCAL_SHARED_LIBRARIES := OpenNI libusb XnCore XnFormats XnDDK
LOCAL_PREBUILT_LIBS := libc
LOCAL_MODULE := XnDeviceSensorV2
include $(BUILD_SHARED_LIBRARY)
Sensor-Stable-5.1.0.41/Platform/Android/jni/XnFormats/ 0000775 0000000 0000000 00000000000 11701035512 0022261 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Android/jni/XnFormats/Android.mk 0000664 0000000 0000000 00000001612 11701035512 0024172 0 ustar 00root root 0000000 0000000 # XnFormats Android makefile.
# libXnFormats.so
#
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# set path to source
MY_PREFIX := $(LOCAL_PATH)/../../../../Source/XnFormats/
# list all source files
MY_SRC_FILES := \
$(MY_PREFIX)*.cpp \
$(MY_PREFIX)../External/LibJPEG/*.c
# expand the wildcards
MY_SRC_FILE_EXPANDED := $(wildcard $(MY_SRC_FILES))
# make those paths relative to here
LOCAL_SRC_FILES := $(MY_SRC_FILE_EXPANDED:$(LOCAL_PATH)/%=%)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../../Include/ \
$(LOCAL_PATH)/../../../../Source/ \
$(LOCAL_PATH)/../../../../Source/XnCommon \
$(LOCAL_PATH)/../../../../Source/External/LibJPEG \
LOCAL_CFLAGS := -fvisibility=hidden -DXN_FORMATS_EXPORTS
LOCAL_LDFLAGS += -Wl,--export-dynamic --dynamic-linker
LOCAL_SHARED_LIBRARIES := OpenNI libusb XnCore
LOCAL_PREBUILT_LIBS := libc
LOCAL_MODULE := XnFormats
include $(BUILD_SHARED_LIBRARY)
Sensor-Stable-5.1.0.41/Platform/Linux/ 0000775 0000000 0000000 00000000000 11701035512 0017277 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/ 0000775 0000000 0000000 00000000000 11701035512 0020336 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/Common/ 0000775 0000000 0000000 00000000000 11701035512 0021566 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/Common/CommonCSMakefile 0000664 0000000 0000000 00000003657 11701035512 0024640 0 ustar 00root root 0000000 0000000 #############################################################################
# Primesense template makefile.
# This file should not be made, but only included from other makefiles.
# By default, this makefile compiles in release. To compile a debug version:
# make CFG=Debug
#
# Project makefile should define the following BEFORE including this file:
# SRC_FILES - a list of all source files
# Output name under one of the following:
# NETLIB_NAME (.net module) or
# NETEXE_NAME (.net executable)
# BIN_DIR - Bin directory (output dir)
# INC_DIRS - a list of additional include directories
# USED_LIBS - a list of libraries to link with
# CSFLAGS - [Optional] additional flags for mono compiler
# NET_WIN_FORMS - [Optional] when 1, application uses WinForms
#############################################################################
# take this file's dir
COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak
# create -r option to mcs
USED_NETLIBS_OPTION = $(foreach lib,$(USED_LIBS),-r:$(lib).dll)
ifeq "$(NET_WIN_FORMS)" "1"
USED_NETLIBS_OPTION += -r:System.Windows.Forms.dll -r:System.Drawing.dll
endif
# add the output dir as a place to search for assemblies
USED_NETLIBS_OPTION += -lib:$(OUT_DIR)
ifeq "$(CFG)" "Release"
CSFLAGS += -o+
endif
# some lib / exe specifics
ifneq "$(NETLIB_NAME)" ""
OUTPUT_NAME = $(NETLIB_NAME).dll
TARGET = library
endif
ifneq "$(NETEXE_NAME)" ""
OUTPUT_NAME = $(NETEXE_NAME).exe
TARGET = winexe
endif
OUTPUT_COMMAND = gmcs -out:$(OUTPUT_FILE) -target:$(TARGET) $(CSFLAGS) $(USED_NETLIBS_OPTION) $(SRC_FILES)
#############################################################################
# Targets
#############################################################################
include $(COMMON_CS_MAKE_FILE_DIR)CommonTargets.mak
# Final output file
$(OUTPUT_FILE):
$(OUTPUT_COMMAND)
Sensor-Stable-5.1.0.41/Platform/Linux/Build/Common/CommonCppMakefile 0000664 0000000 0000000 00000011211 11701035512 0025036 0 ustar 00root root 0000000 0000000 #############################################################################
# Primesense template makefile.
# This file should not be made, but only included from other makefiles.
# By default, this makefile compiles in release. To compile a debug version:
# make CFG=Debug
#
# Project makefile should define the following BEFORE including this file:
# SRC_FILES - a list of all source files
# Output name under one of the following:
# EXE_NAME (executable),
# LIB_NAME (dynamic library) or
# SLIB_NAME (static library) or
# BIN_DIR - Bin directory (output dir)
# INC_DIRS - a list of additional include directories
# LIB_DIRS - a list of additional library directories
# USED_LIBS - a list of libraries to link with
# DEFINES - [Optional] additional preprocessor defines
# CFLAGS - [Optional] additional flags for the compiler
# LDFLAGS - [Optional] additional flags for the linker
# SSE_GENERATION - [Optional] The SSE generation to use (default is 3)
# TARGET_SYS_ROOT - [Optional] The path to the root of the target
#############################################################################
# take this file's dir
COMMON_CPP_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
include $(COMMON_CPP_MAKE_FILE_DIR)CommonDefs.mak
# define a function to figure .o file for each source file (placed under intermediate directory)
SRC_TO_OBJ = $(addprefix ./$(INT_DIR)/,$(addsuffix .o,$(notdir $(basename $1))))
# create a list of all object files
OBJ_FILES = $(call SRC_TO_OBJ,$(SRC_FILES_LIST))
# define a function to translate any source file to its dependency file (note that the way we create
# dep files, as a side affect of compilation, always puts the files in the INT_DIR with suffix .d)
SRC_TO_DEP = $(addprefix ./$(INT_DIR)/,$(addsuffix .d,$(notdir $(basename $1))))
# create a list of all dependency files
DEP_FILES = $(call SRC_TO_DEP,$(SRC_FILES_LIST))
# older version of gcc doesn't support the '=' symbol in include dirs, so we replace it ourselves with sysroot
INC_DIRS_FROM_SYSROOT = $(patsubst =/%,$(TARGET_SYS_ROOT)/%,$(INC_DIRS))
# append the -I switch to each include directory
INC_DIRS_OPTION = $(foreach dir,$(INC_DIRS_FROM_SYSROOT),-I$(dir))
# append the -L switch to each library directory
LIB_DIRS_OPTION = $(foreach dir,$(LIB_DIRS),-L$(dir)) -L$(OUT_DIR)
# append the -l switch to each library used
USED_LIBS_OPTION = $(foreach lib,$(USED_LIBS),-l$(lib))
# append the -D switch to each define
DEFINES_OPTION = $(foreach def,$(DEFINES),-D$(def))
# tell compiler to use the target system root
ifdef TARGET_SYS_ROOT
CFLAGS += --sysroot=$(TARGET_SYS_ROOT)
LDFLAGS += --sysroot=$(TARGET_SYS_ROOT)
endif
# set Debug / Release flags
ifeq "$(CFG)" "Debug"
CFLAGS += -O0 -g
endif
ifeq "$(CFG)" "Release"
CFLAGS += -O2 -DNDEBUG
endif
CFLAGS += $(INC_DIRS_OPTION) $(DEFINES_OPTION)
LDFLAGS += $(LIB_DIRS_OPTION) $(USED_LIBS_OPTION)
# some lib / exe specifics
ifneq "$(LIB_NAME)" ""
OUTPUT_NAME = lib$(LIB_NAME).so
CFLAGS += -fPIC -fvisibility=hidden
ifneq ("$(OSTYPE)","Darwin")
LDFLAGS += -Wl,--no-undefined
OUTPUT_NAME = lib$(LIB_NAME).so
OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -shared
else
LDFLAGS += -undefined error
OUTPUT_NAME = lib$(LIB_NAME).dylib
OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -dynamiclib -headerpad_max_install_names
endif
endif
ifneq "$(EXE_NAME)" ""
OUTPUT_NAME = $(EXE_NAME)
OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS)
endif
ifneq "$(SLIB_NAME)" ""
CFLAGS += -fPIC
OUTPUT_NAME = lib$(SLIB_NAME).a
OUTPUT_COMMAND = $(AR) -cq $(OUTPUT_FILE) $(OBJ_FILES)
endif
define CREATE_SRC_TARGETS
# create a target for the object file (the CXX command creates both an .o file
# and a .d file)
ifneq ("$(OSTYPE)","Darwin")
$(call SRC_TO_OBJ,$1) : $1 | $(INT_DIR)
$(CXX) -MD -MP -MT "$(call SRC_TO_DEP,$1) $$@" -c $(CFLAGS) -o $$@ $$<
else
$(call SRC_TO_OBJ,$1) : $1 | $(INT_DIR)
$(CXX) -c $(CFLAGS) -o $$@ $$<
endif
endef
#############################################################################
# Targets
#############################################################################
.PHONY: clean-objs clean-defs
include $(COMMON_CPP_MAKE_FILE_DIR)CommonTargets.mak
# create targets for each source file
$(foreach src,$(SRC_FILES_LIST),$(eval $(call CREATE_SRC_TARGETS,$(src))))
# include all dependency files (we don't need them the first time, so we can use -include)
-include $(DEP_FILES)
$(OUTPUT_FILE): $(OBJ_FILES)
$(OUTPUT_COMMAND)
clean-objs:
rm -rf $(OBJ_FILES)
clean-defs:
rm -rf $(DEP_FILES)
clean: clean-objs clean-defs
Sensor-Stable-5.1.0.41/Platform/Linux/Build/Common/CommonDefs.mak 0000664 0000000 0000000 00000003056 11701035512 0024316 0 ustar 00root root 0000000 0000000 # some defaults
ifndef CFG
CFG = Release
endif
# find out the platform on which we're running
MACHINE = $(shell uname -m)
ifneq (,$(findstring x86_64,$(MACHINE)))
HOST_PLATFORM = x64
else ifneq (,$(findstring x86,$(MACHINE)))
HOST_PLATFORM = x86
else ifneq (,$(findstring i686,$(MACHINE)))
HOST_PLATFORM = x86
else ifneq (,$(findstring i386,$(MACHINE)))
HOST_PLATFORM = x86
else ifneq (,$(findstring arm,$(MACHINE)))
HOST_PLATFORM = Arm
else
DUMMY:=$(error Can't determine host platform)
endif
# now check if this is a cross-compilation or not
ifeq "$(PLATFORM)" ""
PLATFORM = $(HOST_PLATFORM)
else
ifneq "$(PLATFORM)" "$(HOST_PLATFORM)"
# cross compiling. Take CXX and STAGING_DIR from environment
PLATFORM_UPPER = $(shell echo $(PLATFORM) | tr 'a-z' 'A-Z')
DUMMY:=$(eval CXX = $($(PLATFORM_UPPER)_CXX))
DUMMY:=$(eval TARGET_SYS_ROOT = $($(PLATFORM_UPPER)_STAGING))
ifeq "$(and $(CXX), $(TARGET_SYS_ROOT))" ""
DUMMY:=$(error Cross-Compilation error. Can't find $(PLATFORM_UPPER)_CXX and $(PLATFORM_UPPER)_STAGING)
endif
endif
endif
# expand file list
SRC_FILES_LIST = $(wildcard $(SRC_FILES))
# define the intermediate directory
INT_DIR = $(PLATFORM)-$(CFG)
# define output directory
OUT_DIR = $(BIN_DIR)/$(PLATFORM)-$(CFG)
# full path to output file
OUTPUT_FILE = $(OUT_DIR)/$(OUTPUT_NAME)
# take this file's dir
COMMON_MAK_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
# get the OS type
OSTYPE := $(shell uname -s)
# platform specific args
include $(COMMON_MAK_DIR)Platform.$(PLATFORM)
Sensor-Stable-5.1.0.41/Platform/Linux/Build/Common/CommonJavaMakefile 0000664 0000000 0000000 00000004704 11701035512 0025206 0 ustar 00root root 0000000 0000000 #############################################################################
# Primesense template makefile.
# This file should not be made, but only included from other makefiles.
# By default, this makefile compiles in release. To compile a debug version:
# make CFG=Debug
#
# Project makefile should define the following BEFORE including this file:
# SRC_FILES - a list of all source files
# JAR_NAME - name of the package
# BIN_DIR - Bin directory (output dir)
# INC_DIRS - a list of additional include directories
# LIB_DIRS - a list of additional library directories
# USED_JARS - a list of libraries used
# MAIN_CLASS - [Optional] for executable jar
#############################################################################
# take this file's dir
COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak
nullstring :=
space := $(nullstring) # end of the line
USED_JARS_OPTION =
ifneq "$(USED_JARS)" ""
USED_JARS_PATH = $(foreach jar, $(USED_JARS), $(OUT_DIR)/$(jar).jar /usr/share/java/$(jar).jar)
USED_JARS_OPTION = -cp $(subst $(space),:,$(strip $(USED_JARS_PATH)))
endif
OUTPUT_NAME = $(JAR_NAME).jar
# create manifest file if needed
JAR_MANIFEST_CREATE_COMMAND :=
MANIFEST_FILE :=
JAR_OPTIONS = -cf
ifneq (, $(if $(or $(MAIN_CLASS), $(USED_JARS)),1))
JAR_OPTIONS = -cfm
MANIFEST_FILE = Manifest.txt
JAR_MANIFEST_CREATE_COMMAND = (
ifneq (,$(MAIN_CLASS))
JAR_MANIFEST_CREATE_COMMAND += echo "Main-Class: $(MAIN_CLASS)";
endif
ifneq (,$(USED_JARS))
JAR_MANIFEST_CREATE_COMMAND += echo "Class-Path: $(USED_JARS_PATH)";
endif
JAR_MANIFEST_CREATE_COMMAND += ) > $(MANIFEST_FILE)
endif
CREATE_SHORTCUT =
ifneq (, $(MAIN_CLASS))
SHORTCUT = $(OUT_DIR)/$(JAR_NAME)
CREATE_SHORTCUT = echo java -jar $(OUTPUT_NAME) > $(SHORTCUT); chmod +x $(SHORTCUT)
endif
#############################################################################
# Targets
#############################################################################
include $(COMMON_CS_MAKE_FILE_DIR)CommonTargets.mak
.PHONY: clean-manifest clean-int
# Final output file
$(OUTPUT_FILE): | $(INT_DIR)
javac $(USED_JARS_OPTION) -d $(INT_DIR) $(SRC_FILES)
$(JAR_MANIFEST_CREATE_COMMAND)
jar $(JAR_OPTIONS) $@ $(MANIFEST_FILE) -C $(INT_DIR) .
$(CREATE_SHORTCUT)
clean-manifest:
rm -rf $(MANIFEST_FILE)
clean-int:
rm -rf $(INT_DIR)
clean: clean-manifest clean-int
Sensor-Stable-5.1.0.41/Platform/Linux/Build/Common/CommonTargets.mak 0000664 0000000 0000000 00000001060 11701035512 0025037 0 ustar 00root root 0000000 0000000 #############################################################################
# Targets
#############################################################################
.PHONY: all clean clean-$(OUTPUT_FILE)
# define the target 'all' (it is first, and so, default)
all: $(OUTPUT_FILE)
# Intermediate directory
$(INT_DIR):
mkdir -p $(INT_DIR)
# Output directory
$(OUT_DIR):
mkdir -p $(OUT_DIR)
# Final output file
$(OUTPUT_FILE): $(SRC_FILES_LIST) | $(OUT_DIR)
clean-$(OUTPUT_FILE):
rm -rf $(OUTPUT_FILE)
clean: clean-$(OUTPUT_FILE) Sensor-Stable-5.1.0.41/Platform/Linux/Build/Common/Platform.Arm 0000664 0000000 0000000 00000000674 11701035512 0024022 0 ustar 00root root 0000000 0000000 ifeq "$(CFG)" "Release"
# Hardware specifying flags
CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-mcpu=cortex-a8
# Optimization level, minus currently buggy optimizing methods (which break bit-exact)
CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing
# More optimization flags
CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant
endif
Sensor-Stable-5.1.0.41/Platform/Linux/Build/Common/Platform.x64 0000664 0000000 0000000 00000000233 11701035512 0023713 0 ustar 00root root 0000000 0000000 # take this file's dir
COMMON_MAK_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
# everything is the same as in x86
include $(COMMON_MAK_DIR)Platform.x86
Sensor-Stable-5.1.0.41/Platform/Linux/Build/Common/Platform.x86 0000664 0000000 0000000 00000000763 11701035512 0023727 0 ustar 00root root 0000000 0000000 # some defaults
export GLUT_SUPPORTED=1
ifndef SSE_GENERATION
SSE_GENERATION = 3
endif
ifeq ("$(OSTYPE)","Darwin")
# Making the binary a universal one (x86 + x64)
CFLAGS += -arch i386 -arch x86_64
LDFLAGS += -arch i386 -arch x86_64
endif
ifeq ($(SSE_GENERATION), 2)
CFLAGS += -msse2
else
ifeq ($(SSE_GENERATION), 3)
CFLAGS += -msse3
ifeq ($(SSSE3_ENABLED), 1)
CFLAGS += -mssse3
endif
else
DUMMY:=($error "Only SSE2 and SSE3 are supported")
endif
endif
Sensor-Stable-5.1.0.41/Platform/Linux/Build/EngineLibMakefile 0000664 0000000 0000000 00000001626 11701035512 0023560 0 ustar 00root root 0000000 0000000 #############################################################################
# Primesense Experience Engine library template makefile.
# This file should not be made, but only included from other makefiles.
#
# Project makefile should define the following BEFORE including this file:
# SRC_FILES - a list of all source files
# LIB_NAME - output name
# INC_DIRS - a list of additional include directories
# LIB_DIRS - a list of additional library directories
# USED_LIBS - a list of libraries to link with
# DEFINES - [Optional] additional preprocessor defines
# CFLAGS - [Optional] additional flags for the compiler
# LDFLAGS - [Optional] additional flags for the linker
#############################################################################
INC_DIRS += \
=/usr/include/ni \
../../../../Include \
../../../../Source \
../../../../Source/XnCommon
BIN_DIR = ../../Bin
include ../Common/CommonCppMakefile
Sensor-Stable-5.1.0.41/Platform/Linux/Build/Makefile 0000664 0000000 0000000 00000003434 11701035512 0022002 0 ustar 00root root 0000000 0000000
#/******************************************************************************
#* *
#* PrimeSense Sensor 5.0 Makefile *
#* Copyright (C) 2010 PrimeSense Ltd. *
#* *
#******************************************************************************/
# default config is Release
ifndef CFG
CFG = Release
endif
# list all modules
ALL_PROJS = \
XnCore \
XnFormats \
XnDDK \
XnDeviceSensorV2 \
Utils/XnSensorServer \
XnDeviceFile \
ALL_PROJS_CLEAN = $(foreach proj,$(ALL_PROJS),$(proj)-clean)
# define a function which creates a target for each proj
define CREATE_PROJ_TARGET
.PHONY: $1 $1-clean
$1:
$(MAKE) -C $1 CFG=$(CFG)
$1-clean:
$(MAKE) -C $1 CFG=$(CFG) clean
endef
########### TARGETS ##############
.PHONY: all install uninstall clean
# make all makefiles
all: $(ALL_PROJS)
# create projects targets
$(foreach proj,$(ALL_PROJS),$(eval $(call CREATE_PROJ_TARGET,$(proj))))
# additional dependencies
XnFormats: XnCore
XnDDK: XnCore
XnDDK: XnFormats
XnLeanDeviceSensorV2: XnDDK
XnLeanDeviceSensorV2: XnFormats
XnLeanDeviceSensorV2: XnCore
Utils/XnSensorServer: XnDDK
Utils/XnSensorServer: XnDeviceSensorV2
Utils/XnSensorServer: XnFormats
XnDeviceFile: XnCore
XnDeviceFile: XnDDK
XnDeviceFile: XnFormats
# clean is cleaning all projects
clean: $(ALL_PROJS_CLEAN)
# redist target
redist: all
cd ../CreateRedist; ./RedistMaker; cd -
# install target
install: redist
cd ../Redist; ./install.sh; cd -
# uninstall
uninstall:
cd ../Redist; ./install.sh -u; cd -
Sensor-Stable-5.1.0.41/Platform/Linux/Build/Utils/ 0000775 0000000 0000000 00000000000 11701035512 0021436 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/Utils/EngineUtilMakefile 0000664 0000000 0000000 00000001641 11701035512 0025064 0 ustar 00root root 0000000 0000000 #############################################################################
# Primesense Experience Engine util template makefile.
# This file should not be made, but only included from other makefiles.
#
# Project makefile should define the following BEFORE including this file:
# SRC_FILES - a list of all source files
# LIB_NAME - output name
# INC_DIRS - a list of additional include directories
# LIB_DIRS - a list of additional library directories
# USED_LIBS - a list of libraries to link with
# DEFINES - [Optional] additional preprocessor defines
# CFLAGS - [Optional] additional flags for the compiler
# LDFLAGS - [Optional] additional flags for the linker
#############################################################################
INC_DIRS += \
=/usr/include/ni \
../../../../../Include \
../../../../../Source \
../../../../../Source/XnCommon
BIN_DIR = ../../../Bin
include ../../Common/CommonCppMakefile
Sensor-Stable-5.1.0.41/Platform/Linux/Build/Utils/XnSensorServer/ 0000775 0000000 0000000 00000000000 11701035512 0024404 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/Utils/XnSensorServer/Makefile 0000664 0000000 0000000 00000000263 11701035512 0026045 0 ustar 00root root 0000000 0000000 SRC_FILES = ../../../../../Source/Utils/XnSensorServer/*.cpp
EXE_NAME = XnSensorServer
USED_LIBS = OpenNI XnCore XnFormats XnDDK XnDeviceSensorV2
include ../EngineUtilMakefile
Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnCore/ 0000775 0000000 0000000 00000000000 11701035512 0021534 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnCore/Makefile 0000664 0000000 0000000 00000000217 11701035512 0023174 0 ustar 00root root 0000000 0000000 SRC_FILES = \
../../../../Source/XnCore/*.cpp
LIB_NAME = XnCore
USED_LIBS = OpenNI
DEFINES = XN_CORE_EXPORTS
include ../EngineLibMakefile
Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnDDK/ 0000775 0000000 0000000 00000000000 11701035512 0021246 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnDDK/Makefile 0000664 0000000 0000000 00000000236 11701035512 0022707 0 ustar 00root root 0000000 0000000 SRC_FILES = ../../../../Source/XnDDK/*.cpp
LIB_NAME = XnDDK
USED_LIBS = XnCore XnFormats OpenNI
DEFINES = XN_DDK_EXPORTS
include ../EngineLibMakefile
Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnDeviceFile/ 0000775 0000000 0000000 00000000000 11701035512 0022643 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnDeviceFile/Makefile 0000664 0000000 0000000 00000000265 11701035512 0024306 0 ustar 00root root 0000000 0000000 SRC_FILES = ../../../../Source/XnDeviceFile/*.cpp
LIB_NAME = XnDeviceFile
USED_LIBS = XnCore XnFormats XnDDK OpenNI
DEFINES = XN_DEVICE_EXPORTS
include ../EngineLibMakefile
Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnDeviceSensorV2/ 0000775 0000000 0000000 00000000000 11701035512 0023445 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnDeviceSensorV2/Makefile 0000664 0000000 0000000 00000000300 11701035512 0025076 0 ustar 00root root 0000000 0000000 SRC_FILES = \
../../../../Source/XnDeviceSensorV2/*.cpp
LIB_NAME = XnDeviceSensorV2
USED_LIBS = XnCore XnFormats XnDDK OpenNI
DEFINES = XN_DEVICE_EXPORTS
include ../EngineLibMakefile
Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnFormats/ 0000775 0000000 0000000 00000000000 11701035512 0022257 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Build/XnFormats/Makefile 0000664 0000000 0000000 00000000373 11701035512 0023722 0 ustar 00root root 0000000 0000000 SRC_FILES = \
../../../../Source/XnFormats/*.cpp \
../../../../Source/External/LibJPEG/*.c
LIB_NAME = XnFormats
USED_LIBS = XnCore OpenNI
DEFINES = XN_FORMATS_EXPORTS
INC_DIRS = ../../../../Source/External/LibJPEG
include ../EngineLibMakefile
Sensor-Stable-5.1.0.41/Platform/Linux/CreateRedist/ 0000775 0000000 0000000 00000000000 11701035512 0021655 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/CreateRedist/RedistMaker 0000664 0000000 0000000 00000004654 11701035512 0024023 0 ustar 00root root 0000000 0000000 #!/bin/bash -e
OS_TYPE=`uname -s`
MACHINE_TYPE=`uname -m`
function calc_jobs_number() {
if [ $OS_TYPE == "Darwin" ] ; then
N_CORES=$(sysctl -n hw.physicalcpu)
else
N_CORES=$(grep "processor\W:" /proc/cpuinfo | wc -l)
fi
echo $((N_CORES*2))
}
if [ $# -gt 1 ]
then
echo "Usaga: $0 [PLATFORM]"
exit 1
fi
if [ $# -eq 1 ]
then
PLATFORM=$1
else
case $MACHINE_TYPE in
x86 | i386 | i686)
PLATFORM="x86" ;;
x86_64)
PLATFORM="x64" ;;
arm)
PLATFORM="Arm" ;;
*)
echo "Unknown machine type: $MACHINE_TYPE"
exit 1
;;
esac
fi
export PLATFORM
if [ "$OS_TYPE" == "Darwin" ]; then
TAR_TARGET="MacOSX"
else
TAR_TARGET="Linux-$PLATFORM"
fi
SCRIPT_DIR=`pwd`
# Take version
MAJOR=`grep "#define XN_PS_MAJOR_VERSION" ../../../Include/XnPsVersion.h | awk '{ print $3 }' | strings -n 1`
MINOR=`grep "#define XN_PS_MINOR_VERSION" ../../../Include/XnPsVersion.h | awk '{ print $3 }' | strings -n 1`
MAINTENANCE=`grep "#define XN_PS_MAINTENANCE_VERSION" ../../../Include/XnPsVersion.h | awk '{ print $3 }' | strings -n 1`
BUILD=`grep "#define XN_PS_BUILD_VERSION" ../../../Include/XnPsVersion.h | awk '{ print $3 }' | strings -n 1`
PS_VERSION="$MAJOR.$MINOR.$MAINTENANCE.$BUILD"
echo "Creating redist for Sensor v$PS_VERSION"
REDIST_NAME="Sensor-Bin-$TAR_TARGET-v$PS_VERSION"
REDIST_DIR="Redist/$REDIST_NAME"
# clean
echo "Cleaning previous outputs..."
rm -rf Final
rm -rf ../$REDIST_DIR
# Build Engine
echo "Building..."
make -C ../Build clean > /dev/null
make -j$(calc_jobs_number) -C ../Build
# create redist folder structure
echo "Creating redist folder..."
mkdir -p ../$REDIST_DIR
mkdir -p ../$REDIST_DIR/Lib
mkdir -p ../$REDIST_DIR/Bin
mkdir -p ../$REDIST_DIR/Install
mkdir -p ../$REDIST_DIR/Config
# copy files to redist
cp ../../../GPL.txt ../$REDIST_DIR
cp ../../../LGPL.txt ../$REDIST_DIR
cp ../Bin/$PLATFORM-Release/libXnDeviceSensorV2.* ../$REDIST_DIR/Lib
cp ../Bin/$PLATFORM-Release/libXnDeviceFile.* ../$REDIST_DIR/Lib
cp ../Bin/$PLATFORM-Release/libXnDDK.* ../$REDIST_DIR/Lib
cp ../Bin/$PLATFORM-Release/libXnFormats.* ../$REDIST_DIR/Lib
cp ../Bin/$PLATFORM-Release/libXnCore.* ../$REDIST_DIR/Lib
cp ../Bin/$PLATFORM-Release/XnSensorServer ../$REDIST_DIR/Bin
cp ../Install/* ../$REDIST_DIR/Install
cp install.sh ../$REDIST_DIR
cp ../../../Data/GlobalDefaults.ini ../$REDIST_DIR/Config
# create tar
echo "Creating tar..."
mkdir -p Final
cd ../Redist
tar -cjf $SCRIPT_DIR/Final/$REDIST_NAME.tar.bz2 $REDIST_NAME
cd $SCRIPT_DIR
echo "Done!"
Sensor-Stable-5.1.0.41/Platform/Linux/CreateRedist/install.sh 0000664 0000000 0000000 00000010020 11701035512 0023650 0 ustar 00root root 0000000 0000000 #!/bin/sh -e
usage="
Usage: $0 [OPTIONS]
Installs PrimeSense Sensor Driver to current machine.
-i,--install
Installs PrimeSense Sensor Driver (default mode)
-u,--uninstall
Uninstalls PrimeSense Sensor Driver.
-c,--cross-compile-rootfs
Used for cross-compiling. Installs PrimeSense Sensor Driver to instead of '/'.
-h,--help
Shows this help screen.
"
OS_NAME=`uname -s`
case $OS_NAME in
Darwin)
MODULES="libXnDeviceSensorV2.dylib libXnDeviceFile.dylib"
;;
*)
MODULES="libXnDeviceSensorV2.so libXnDeviceFile.so"
;;
esac
RULES_FILE="55-primesense-usb.rules"
# create file list
SCRIPT_DIR=`pwd`/`dirname $0`
LIB_FILES=`ls $SCRIPT_DIR/Lib/*`
BIN_FILES=`ls $SCRIPT_DIR/Bin/*`
rootfs=
# parse command line
while [ "$1" ]; do
case $1 in
-i|--install)
install=yes
;;
-u|--uninstall)
uninstall=yes
;;
-c|--cross-staging-dir)
shift
rootfs=$1
;;
-h|--help)
echo "$usage"
exit 0
;;
*)
echo "Unrecognized option $1"
exit 1
esac
shift
done
# default mode is install
if [ ! "$install" = yes ] && [ ! "$uninstall" = yes ]; then
install=yes
fi
# validity check
if [ "$install" = yes ] && [ "$uninstall" = yes ]; then
echo "-i and -u flags cannot be used together!"
exit 1
fi
INSTALL_LIB=$rootfs/usr/lib
INSTALL_BIN=$rootfs/usr/bin
INSTALL_ETC=$rootfs/usr/etc/primesense
INSTALL_RULES=$rootfs/etc/udev/rules.d
SERVER_LOGS_DIR=$rootfs/var/log/primesense/XnSensorServer
# make all calls into OpenNI run in this filesystem
export OPEN_NI_INSTALL_PATH=$rootfs
# make sure the staging dir OpenNI is the one being run
export LD_LIBRARY_PATH=$INSTALL_LIB
if [ "$install" = yes ]; then
printf "Installing PrimeSense Sensor\n"
printf "****************************\n\n"
# create config dir
printf "creating config dir $INSTALL_ETC..."
mkdir -p $INSTALL_ETC
printf "OK\n"
# Copy shared libraries
printf "copying shared libraries..."
cp $LIB_FILES $INSTALL_LIB
printf "OK\n"
# Copy executables
printf "copying executables..."
cp $BIN_FILES $INSTALL_BIN
printf "OK\n"
# register modules
for module in $MODULES; do
printf "registering module '$module' with OpenNI..."
$INSTALL_BIN/niReg -r $INSTALL_LIB/$module $INSTALL_ETC
printf "OK\n"
done
# copy config file
printf "copying server config file..."
cp Config/GlobalDefaults.ini $INSTALL_ETC
printf "OK\n"
# make server run as root
printf "setting uid of server..."
chown root $INSTALL_BIN/XnSensorServer
chmod +s $INSTALL_BIN/XnSensorServer
printf "OK\n"
# create server log dir
printf "creating server logs dir..."
mkdir -p $SERVER_LOGS_DIR
# make this dir readable and writable by all (we allow anyone to delete logs)
chmod a+w $SERVER_LOGS_DIR
printf "OK\n"
if [ "`uname -s`" != "Darwin" ]; then
# install USB rules (so that PrimeSense sensors will be mounted with write permissions)
printf "installing usb rules..."
cp Install/$RULES_FILE $INSTALL_RULES
printf "OK\n"
fi
printf "\n*** DONE ***\n\n"
elif [ "$uninstall" = yes ]; then
printf "Uninstalling PrimeSense Sensor\n"
printf "******************************\n\n"
# unregister modules
for module in $MODULES; do
printf "unregistering module '$module' from OpenNI..."
if $INSTALL_BIN/niReg -u $INSTALL_LIB/$module; then
printf "OK\n"
fi
done
# delete shared libraries
printf "removing shared libraries..."
for filename in $LIB_FILES; do
rm -f $INSTALL_LIB/`basename $filename`
done
printf "OK\n"
# delete executables
printf "removing executables..."
for filename in $BIN_FILES; do
rm -f $INSTALL_BIN/`basename $filename`
done
printf "OK\n"
# delete config dir
printf "removing config dir..."
rm -rf $INSTALL_ETC
printf "OK\n"
if [ "`uname -s`" != "Darwin" ]; then
# remove USB rules
printf "removing usb rules..."
rm -f $INSTALL_RULES/$RULES_FILE
printf "OK\n"
fi
printf "\n*** DONE ***\n\n"
fi
Sensor-Stable-5.1.0.41/Platform/Linux/Install/ 0000775 0000000 0000000 00000000000 11701035512 0020705 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Linux/Install/55-primesense-usb.rules 0000664 0000000 0000000 00000001150 11701035512 0025146 0 ustar 00root root 0000000 0000000 # make primesense device mount with writing permissions (default is read only for unknown devices)
SYSFS{idProduct}=="0200",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users"
SYSFS{idProduct}=="0300",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users"
SYSFS{idProduct}=="0400",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users"
SYSFS{idProduct}=="0500",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users"
SYSFS{idProduct}=="0600",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users"
SYSFS{idProduct}=="0601",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users"
Sensor-Stable-5.1.0.41/Platform/Win32/ 0000775 0000000 0000000 00000000000 11701035512 0017102 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/ 0000775 0000000 0000000 00000000000 11701035512 0020141 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/Engine.sln 0000664 0000000 0000000 00000004501 11701035512 0022064 0 ustar 00root root 0000000 0000000 Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnCore", "XnCore\XnCore.vcproj", "{7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A}"
EndProject
Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnFormats", "XnFormats\XnFormats.vcproj", "{9CAEC325-EEE6-4A91-8819-004E20C419C0}"
ProjectSection(ProjectDependencies) = postProject
{7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} = {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A}
EndProjectSection
EndProject
Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnDDK", "XnDDK\XnDDK.vcproj", "{FB08A9D1-10AF-418D-8786-F58FDF11254D}"
ProjectSection(ProjectDependencies) = postProject
{7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} = {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A}
{9CAEC325-EEE6-4A91-8819-004E20C419C0} = {9CAEC325-EEE6-4A91-8819-004E20C419C0}
EndProjectSection
EndProject
Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnDeviceSensorV2", "XnDeviceSensorV2\XnDeviceSensorV2.vcproj", "{1653839A-ABA5-4c0e-9EA2-2640B0275894}"
ProjectSection(ProjectDependencies) = postProject
{FB08A9D1-10AF-418D-8786-F58FDF11254D} = {FB08A9D1-10AF-418D-8786-F58FDF11254D}
{9CAEC325-EEE6-4A91-8819-004E20C419C0} = {9CAEC325-EEE6-4A91-8819-004E20C419C0}
{7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} = {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A}
EndProjectSection
EndProject
Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "Utils\XnSensorServer", "Utils\XnSensorServer\XnSensorServer.vcproj", "{F68C824E-EA49-4A3C-A233-ADE2B3ECC375}"
ProjectSection(ProjectDependencies) = postProject
{FB08A9D1-10AF-418D-8786-F58FDF11254D} = {FB08A9D1-10AF-418D-8786-F58FDF11254D}
{1653839A-ABA5-4c0e-9EA2-2640B0275894} = {1653839A-ABA5-4c0e-9EA2-2640B0275894}
{9CAEC325-EEE6-4A91-8819-004E20C419C0} = {9CAEC325-EEE6-4A91-8819-004E20C419C0}
EndProjectSection
EndProject
Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "XnDeviceFile", "XnDeviceFile\XnDeviceFile.vcproj", "{7410A46D-8120-4C95-B7B4-BC8AFEBBBD5B}"
ProjectSection(ProjectDependencies) = postProject
{7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A} = {7410A46D-8120-4C95-B7B4-BC8AFEBBBD5A}
{FB08A9D1-10AF-418D-8786-F58FDF11254D} = {FB08A9D1-10AF-418D-8786-F58FDF11254D}
{9CAEC325-EEE6-4A91-8819-004E20C419C0} = {9CAEC325-EEE6-4A91-8819-004E20C419C0}
EndProjectSection
EndProject
Sensor-Stable-5.1.0.41/Platform/Win32/Build/Res/ 0000775 0000000 0000000 00000000000 11701035512 0020672 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/Res/DDK.rc 0000664 0000000 0000000 00000006122 11701035512 0021623 0 ustar 00root root 0000000 0000000 // Microsoft Visual C++ generated resource script.
//
#include "Resource-DDK.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
#include
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Swedish resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_SVE)
#ifdef _WIN32
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"Resource-DDK.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // Swedish resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Hebrew resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HEB)
#ifdef _WIN32
LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT
#pragma code_page(1255)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MAINICON ICON "mainicon.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION XN_PS_MAJOR_VERSION,XN_PS_MINOR_VERSION,XN_PS_MAINTENANCE_VERSION,XN_PS_BUILD_VERSION
PRODUCTVERSION XN_PS_MAJOR_VERSION,XN_PS_MINOR_VERSION,XN_PS_MAINTENANCE_VERSION,XN_PS_BUILD_VERSION
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x0L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000904b0"
BEGIN
VALUE "CompanyName", "Prime Sense Ltd."
VALUE "FileDescription", "Prime Sense Device Development Kit"
VALUE "FileVersion", XN_PS_BRIEF_VERSION_STRING
VALUE "InternalName", "PSDDK"
VALUE "LegalCopyright", "Copyright (C) 2007"
VALUE "ProductName", "Prime Sense Device Development Kit"
VALUE "ProductVersion", XN_PS_BRIEF_VERSION_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x9, 1200
END
END
#endif // Hebrew resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
Sensor-Stable-5.1.0.41/Platform/Win32/Build/Res/Resource-DDK.h 0000664 0000000 0000000 00000004071 11701035512 0023234 0 ustar 00root root 0000000 0000000 /****************************************************************************
* *
* PrimeSense Sensor 5.x Alpha *
* Copyright (C) 2011 PrimeSense Ltd. *
* *
* This file is part of PrimeSense Sensor. *
* *
* PrimeSense Sensor is free software: you can redistribute it and/or modify*
* it under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* PrimeSense Sensor is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with PrimeSense Sensor. If not, see .*
* *
****************************************************************************/
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by DDK.rc
//
#define IDI_MAINICON 110
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 116
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1016
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
Sensor-Stable-5.1.0.41/Platform/Win32/Build/Res/mainicon.ico 0000664 0000000 0000000 00000024446 11701035512 0023175 0 ustar 00root root 0000000 0000000 ( F è n 00 ¨ V @@ ( þ ( € € € €€ € € € €€ €€€ ÀÀÀ ÿ ÿ ÿÿ ÿ ÿ ÿ ÿÿ ÿÿÿ xwp p wxp ˆwp € w wp wwp w€ ˆ €€ p w ‡wpwwp p ( @ € € €€ € € € €€ €€€ ÀÀÀ ÿ ÿ ÿÿ ÿ ÿ ÿ ÿÿ ÿÿÿ ÿˆp ‡wwx‡ p ‡ € ø xp ˆ€ wxˆ‡p xxxxˆw ‡‡ ˆ xp ‡ ‡€ xˆp ˆwp x ˆp p xwxx‡ ‡p w p ‡ ‡€ ‡ ™p xw ˆ ™ ˆ‡ x ™ ÿ€ p™ €p p p ‡ ww÷w p ÿÿÿˆw ÷wwww ww ( 0 ` € € €€ € € € €€ ÀÀÀ ÀÜÀ ðʦ """ ))) UUU MMM BBB 999 €|ÿ PPÿ “ Ö ÿìÌ ÆÖï Öçç © 3 f ™ Ì 3 33 3f 3™ 3Ì 3ÿ f f3 ff f™ fÌ fÿ ™ ™3 ™f ™™ ™Ì ™ÿ Ì Ì3 Ìf Ì™ ÌÌ Ìÿ ÿf ÿ™ ÿÌ 3 3 3 3 f 3 ™ 3 Ì 3 ÿ 33 333 33f 33™ 33Ì 33ÿ 3f 3f3 3ff 3f™ 3fÌ 3fÿ 3™ 3™3 3™f 3™™ 3™Ì 3™ÿ 3Ì 3Ì3 3Ìf 3Ì™ 3ÌÌ 3Ìÿ 3ÿ3 3ÿf 3ÿ™ 3ÿÌ 3ÿÿ f f 3 f f f ™ f Ì f ÿ f3 f33 f3f f3™ f3Ì f3ÿ ff ff3 fff ff™ ffÌ f™ f™3 f™f f™™ f™Ì f™ÿ fÌ fÌ3 fÌ™ fÌÌ fÌÿ fÿ fÿ3 fÿ™ fÿÌ Ì ÿ ÿ Ì ™™ ™3™ ™ ™ ™ Ì ™ ™33 ™ f ™3Ì ™ ÿ ™f ™f3 ™3f ™f™ ™fÌ ™3ÿ ™™3 ™™f ™™™ ™™Ì ™™ÿ ™Ì ™Ì3 fÌf ™Ì™ ™ÌÌ ™Ìÿ ™ÿ ™ÿ3 ™Ìf ™ÿ™ ™ÿÌ ™ÿÿ Ì ™ 3 Ì f Ì ™ Ì Ì ™3 Ì33 Ì3f Ì3™ Ì3Ì Ì3ÿ Ìf Ìf3 ™ff Ìf™ ÌfÌ ™fÿ Ì™ Ì™3 Ì™f Ì™™ Ì™Ì Ì™ÿ ÌÌ ÌÌ3 ÌÌf ÌÌ™ ÌÌÌ ÌÌÿ Ìÿ Ìÿ3 ™ÿf Ìÿ™ ÌÿÌ Ìÿÿ Ì 3 ÿ f ÿ ™ Ì3 ÿ33 ÿ3f ÿ3™ ÿ3Ì ÿ3ÿ ÿf ÿf3 Ìff ÿf™ ÿfÌ Ìfÿ ÿ™ ÿ™3 ÿ™f ÿ™™ ÿ™Ì ÿ™ÿ ÿÌ ÿÌ3 ÿÌf ÿÌ™ ÿÌÌ ÿÌÿ ÿÿ3 Ìÿf ÿÿ™ ÿÿÌ ffÿ fÿf fÿÿ ÿff ÿfÿ ÿÿf ! ¥ ___ www ††† ––– ËËË ²²² ××× ÝÝÝ ããã êêê ñññ øøø ðûÿ ¤ €€€ ÿ ÿ ÿÿ ÿ ÿ ÿ ÿÿ ÿÿÿ
mïðòóòñ÷mC
Cñÿÿÿÿÿÿÿÿÿÿÿóï
¼ÿó÷ê m’ððë
óí
÷ðë
Cð¼
ÿê
òÿ
ëÿôC
Cÿÿï
øÿÿÿ
Cmÿÿÿÿ
êëíïîñôÿÿÿÿÿÿï
ìñÿÿÿÿÿÿÿÿÿÿôóðïê
ÿÿÿÿó÷íømC
ÿÿÿóm
òÿÿ
øÿÿ
ÿì
ÿê
øÿï
÷ôòÿñ
ìÿÿÿï÷ì
¼ÿÿñ¼óÿñ
ìÿÿï
Cÿÿó
¼ÿÿ
ëÿÿí
ëm
ôÿð
¼ÿÿÿÿÿò’C
ïÿÿC¼ÿ¼’ëmmøïò
êÿÿë
m¼ï
òÿï
øôë
ìððì
íÿò
#FF$
ÿï
ÿÿÿÿï
ÿÿ
$GGGGF
mÿð
ÿÿÿÿÿÿ
¼ÿì
GGGGGG#
ïÿñ
øÿÿÿÿÿÿm
ëÿ
GGGGGG$
ÿÿ
ÿÿÿÿÿÿ
ôô
GGGGGG#
óÿÿê
ïÿÿÿÿ’
ÿê
#GGGGE
¼ÿÿï
ëm
ëÿ÷
EE#
òÿÿð
ê
C
ÿñ
ìÿÿÿ÷
mÿ’
÷ð
ÿÿø
ïÿÿÿ
óÿÿ¼íëêêë’¼ò¼ë
ìÿóïïïï¼óÿÿñï
C¼ÿÿÿÿÿÿÿÿÿÿðìC
ÿ÷
C
ø’ïï÷ìm
C
€ € € ( @ € € € €€ € € € €€ ÀÀÀ ÀÜÀ ðʦ """ ))) UUU MMM BBB 999 €|ÿ PPÿ “ Ö ÿìÌ ÆÖï Öçç © 3 f ™ Ì 3 33 3f 3™ 3Ì 3ÿ f f3 ff f™ fÌ fÿ ™ ™3 ™f ™™ ™Ì ™ÿ Ì Ì3 Ìf Ì™ ÌÌ Ìÿ ÿf ÿ™ ÿÌ 3 3 3 3 f 3 ™ 3 Ì 3 ÿ 33 333 33f 33™ 33Ì 33ÿ 3f 3f3 3ff 3f™ 3fÌ 3fÿ 3™ 3™3 3™f 3™™ 3™Ì 3™ÿ 3Ì 3Ì3 3Ìf 3Ì™ 3ÌÌ 3Ìÿ 3ÿ3 3ÿf 3ÿ™ 3ÿÌ 3ÿÿ f f 3 f f f ™ f Ì f ÿ f3 f33 f3f f3™ f3Ì f3ÿ ff ff3 fff ff™ ffÌ f™ f™3 f™f f™™ f™Ì f™ÿ fÌ fÌ3 fÌ™ fÌÌ fÌÿ fÿ fÿ3 fÿ™ fÿÌ Ì ÿ ÿ Ì ™™ ™3™ ™ ™ ™ Ì ™ ™33 ™ f ™3Ì ™ ÿ ™f ™f3 ™3f ™f™ ™fÌ ™3ÿ ™™3 ™™f ™™™ ™™Ì ™™ÿ ™Ì ™Ì3 fÌf ™Ì™ ™ÌÌ ™Ìÿ ™ÿ ™ÿ3 ™Ìf ™ÿ™ ™ÿÌ ™ÿÿ Ì ™ 3 Ì f Ì ™ Ì Ì ™3 Ì33 Ì3f Ì3™ Ì3Ì Ì3ÿ Ìf Ìf3 ™ff Ìf™ ÌfÌ ™fÿ Ì™ Ì™3 Ì™f Ì™™ Ì™Ì Ì™ÿ ÌÌ ÌÌ3 ÌÌf ÌÌ™ ÌÌÌ ÌÌÿ Ìÿ Ìÿ3 ™ÿf Ìÿ™ ÌÿÌ Ìÿÿ Ì 3 ÿ f ÿ ™ Ì3 ÿ33 ÿ3f ÿ3™ ÿ3Ì ÿ3ÿ ÿf ÿf3 Ìff ÿf™ ÿfÌ Ìfÿ ÿ™ ÿ™3 ÿ™f ÿ™™ ÿ™Ì ÿ™ÿ ÿÌ ÿÌ3 ÿÌf ÿÌ™ ÿÌÌ ÿÌÿ ÿÿ3 Ìÿf ÿÿ™ ÿÿÌ ffÿ fÿf fÿÿ ÿff ÿfÿ ÿÿf ! ¥ ___ www ††† ––– ËËË ²²² ××× ÝÝÝ ããã êêê ñññ øøø ðûÿ ¤ €€€ ÿ ÿ ÿÿ ÿ ÿ ÿ ÿÿ ÿÿÿ
ìðñòñðïìmC
¼ÿÿÿÿÿÿÿÿÿÿÿÿÿóïm
ÿÿÿÿÿôñ¼ïïïï¼òÿÿÿê
ðÿÿòí
øÿóë
ôôë
mñôø
ø
môò
¼ÿ’
¼ÿ
óÿð
øÿÿ
ôÿÿø
ðÿÿó
ôÿÿÿm
ëóÿÿÿÿ’
Cmìïóÿÿÿÿÿÿì
mø’ï¼òôÿÿÿÿÿÿÿÿÿÿÿ
íñÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿóm
êôÿÿÿÿÿÿÿÿÿÿóñ¼ï’ìmC
óÿÿÿÿÿóïëC
Cÿÿÿÿÿø
óÿÿÿë
’ÿÿÿ
òÿÿ
ÿÿï
ôÿì
Cðÿï
øôÿ’mïñ
ìôÿòÿÿÿ’
ëñÿÿÿóíøëm
ÿÿÿÿÿÿÿÿÿó
òÿÿÿ’øì’ï
’ÿÿÿï
ÿÿÿó
òÿÿÿ
’ÿÿÿì
ÿÿÿ¼
ëììmC
¼ÿÿÿ
÷óÿÿÿÿÿÿòí
øÿÿÿêóÿÿÿÿòð¼¼òÿÿñm
ôÿÿíóø
ïÿóê
ïÿÿñ
ìÿ¼C
ÿÿÿ
ïÿì
mìë
òÿÿø
#$
øÿðC
óÿÿÿÿø
íÿÿ
#GGGGG#
ìÿôê
ÿÿÿÿÿÿÿë
ÿÿó
#GGGGGGG#
ïÿÿø
ïÿÿÿÿÿÿÿò
¼ÿÿ
FGGGGGGGF
óÿÿø
òÿÿÿÿÿÿÿÿC
ëÿÿ’
FGGGGGGGG
íÿÿÿê
òÿÿÿÿÿÿÿÿ
ôÿð
FGGGGGGGG
ÿÿÿò
ïÿÿÿÿÿÿÿð
ïÿÿ
FGGGGGGGF
ñÿÿÿì
óÿÿÿÿÿÿê
mÿÿm
GGGGGGG
ÿÿÿò
ñÿÿÿóm
ôÿï
FGGGF
ÿÿÿÿ
m
ÿò
ÿÿÿÿÿ
øm
ëm
’ÿÿ
ÿÿÿÿ¼
ñÿí
ëòò
÷ÿÿ’
ñÿÿÿÿò
ïÿÿó÷ê
øÿôì
óÿÿÿò÷ìmm’ñÿÿÿÿóì
òÿÿÿÿÿóñ¼¼ñôÿÿÿê
mÿÿøøíïðñòóôôÿôñ÷ø
ïÿÿÿÿÿÿÿÿÿÿÿÿÿòïm
ÿÿ
ëï¼ñññðïìê
@ @ @ € € @ @ Sensor-Stable-5.1.0.41/Platform/Win32/Build/Utils/ 0000775 0000000 0000000 00000000000 11701035512 0021241 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/Utils/XnSensorServer/ 0000775 0000000 0000000 00000000000 11701035512 0024207 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/Utils/XnSensorServer/XnSensorServer.vcproj 0000664 0000000 0000000 00000023024 11701035512 0030403 0 ustar 00root root 0000000 0000000
Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnCore/ 0000775 0000000 0000000 00000000000 11701035512 0021337 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnCore/XnCore.vcproj 0000664 0000000 0000000 00000031364 11701035512 0023771 0 ustar 00root root 0000000 0000000
Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnDDK/ 0000775 0000000 0000000 00000000000 11701035512 0021051 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnDDK/XnDDK.vcproj 0000664 0000000 0000000 00000050462 11701035512 0023215 0 ustar 00root root 0000000 0000000
Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnDeviceFile/ 0000775 0000000 0000000 00000000000 11701035512 0022446 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnDeviceFile/XnDeviceFile.vcproj 0000664 0000000 0000000 00000027535 11701035512 0026214 0 ustar 00root root 0000000 0000000
Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnDeviceSensorV2/ 0000775 0000000 0000000 00000000000 11701035512 0023250 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnDeviceSensorV2/XnDeviceSensorV2.vcproj 0000664 0000000 0000000 00000063135 11701035512 0027614 0 ustar 00root root 0000000 0000000
Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnFormats/ 0000775 0000000 0000000 00000000000 11701035512 0022062 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/Build/XnFormats/XnFormats.vcproj 0000664 0000000 0000000 00000141763 11701035512 0025244 0 ustar 00root root 0000000 0000000
Sensor-Stable-5.1.0.41/Platform/Win32/CreateRedist/ 0000775 0000000 0000000 00000000000 11701035512 0021460 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/CreateRedist/EE_NI/ 0000775 0000000 0000000 00000000000 11701035512 0022337 5 ustar 00root root 0000000 0000000 Sensor-Stable-5.1.0.41/Platform/Win32/CreateRedist/EE_NI/EE_NI.sln 0000664 0000000 0000000 00000002266 11701035512 0023742 0 ustar 00root root 0000000 0000000 
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "EE_NI", "EE_NI.wixproj", "{C48CADD9-CCFF-4819-A860-840FC26E90AE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C48CADD9-CCFF-4819-A860-840FC26E90AE}.Debug|x64.ActiveCfg = Debug|x64
{C48CADD9-CCFF-4819-A860-840FC26E90AE}.Debug|x64.Build.0 = Debug|x64
{C48CADD9-CCFF-4819-A860-840FC26E90AE}.Debug|x86.ActiveCfg = Debug|x86
{C48CADD9-CCFF-4819-A860-840FC26E90AE}.Debug|x86.Build.0 = Debug|x86
{C48CADD9-CCFF-4819-A860-840FC26E90AE}.Release|x64.ActiveCfg = Release|x64
{C48CADD9-CCFF-4819-A860-840FC26E90AE}.Release|x64.Build.0 = Release|x64
{C48CADD9-CCFF-4819-A860-840FC26E90AE}.Release|x86.ActiveCfg = Release|x86
{C48CADD9-CCFF-4819-A860-840FC26E90AE}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Sensor-Stable-5.1.0.41/Platform/Win32/CreateRedist/EE_NI/EE_NI.wixproj 0000664 0000000 0000000 00000010351 11701035512 0024642 0 ustar 00root root 0000000 0000000 
Debug
x86
3.5
{c48cadd9-ccff-4819-a860-840fc26e90ae}
2.0
EE_NI
Package
$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets
$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets
bin\$(Configuration)\
obj\$(Configuration)\
Debug;EE_NIFilesDir=..\..\..\..\Redist
-arch x86
bin\$(Configuration)\
obj\$(Configuration)\
EE_NIFilesDir=..\..\..\..\Redist
-arch x86
Debug;EE_NIFilesDir=..\..\..\..\..\Redist
bin\$(Configuration)\
obj\$(Platform)\$(Configuration)\
-arch x64
EE_NIFilesDir=..\..\..\..\..\Redist
bin\$(Configuration)\
obj\$(Platform)\$(Configuration)\
-arch x64
$(WixExtDir)\WixUtilExtension.dll
WixUtilExtension
$(WixExtDir)\WixUIExtension.dll
WixUIExtension
$(WixExtDir)\WixNetFxExtension.dll
WixNetFxExtension
"$(WIX)bin\heat.exe" dir "..\..\..\..\Redist" -cg EE_NIFiles -gg -scom -sreg -sfrag -srd -dr INSTALLLOCATION -var var.EE_NIFilesDir -out "$(ProjectDir)Fragments\FilesFragment.wxs"
"$(WIX)bin\setupbld.exe" -out EE_NI_setup.exe -msu "!(TargetPath)" -setup "$(ProjectDir)setup.exe" -title "EE_NI setup"