Skip to content

Commit

Permalink
Updated to version 1.5.2.23.
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenNI committed Jan 4, 2012
1 parent 1c1367c commit 4dbf64b
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 18 deletions.
8 changes: 8 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Detailed Change log:
--------------------

Version 1.5.2.23 (Stable version - Dec 28th 2011)
-------------------------------------------------
* C++: IRMetaData didn't have operator() and operator[], which is inconsistent with depth and scene.
* Fixed some memory deallocation mismatches.
* Remove redundant USB warning message on Linux (this is normal behavior).
* Java wrappers: adding getDataPtr(), createDataByteBuffer() and copyDataToBuffer() to Generator class.
* NiViewer: did not check if StartGenerating was successful.

Version 1.5.2.7 (Unstable version - Dec 18th 2011)
--------------------------------------------------
* Java UserTracker sample will now draw the limbs only when both joints have a non-zero confidence.
Expand Down
Binary file modified Documentation/OpenNI.chm
Binary file not shown.
23 changes: 23 additions & 0 deletions Include/XnCppWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,29 @@ namespace xn
/// @copydoc OutputMetaData::WritableData
inline XnIRPixel* WritableData() { return (XnIRPixel*)MapMetaData::WritableData(); }

/**
* Gets the value of the pixel
*
* @param nIndex [in] The index of the pixel in the buffer.
*/
inline const XnIRPixel& operator[](XnUInt32 nIndex) const
{
XN_ASSERT(nIndex < (XRes()*YRes()));
return Data()[nIndex];
}

/**
* Gets the value of the pixel
*
* @param x [in] X-coordinate of the pixel in the map
* @param y [in] Y-coordinate of the pixel in the map
*/
inline const XnIRPixel& operator()(XnUInt32 x, XnUInt32 y) const
{
XN_ASSERT(x < XRes() && y < YRes());
return Data()[y*XRes() + x];
}

/// Gets a light object wrapping the IR map
inline const xn::IRMap& IRMap() const { return m_irMap; }
/// Gets a light object wrapping the writable IR map
Expand Down
2 changes: 1 addition & 1 deletion Include/XnVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/** OpenNI maintenance version. */
#define XN_MAINTENANCE_VERSION 2
/** OpenNI build version. */
#define XN_BUILD_VERSION 7
#define XN_BUILD_VERSION 23

/** OpenNI version (in brief string format): "Major.Minor.Maintenance (Build)" */
#define XN_BRIEF_VERSION_STRING \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,6 @@ void fillBitmap(int *dstBuf, char useScene, char useDepth, char useHistogram, ch
unsigned int nValue = 0;
float nHistValue = 0;
unsigned int nIndex = 0;
unsigned int nX = 0;
unsigned int nY = 0;
XnUInt32 nColorID;

unsigned char *pDestImage = (unsigned char *)dstBuf;
Expand Down
4 changes: 2 additions & 2 deletions Platform/Linux/Build/Res/AssemblyInfo-OpenNI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.2.7")]
[assembly: AssemblyFileVersion("1.5.2.7")]
[assembly: AssemblyVersion("1.5.2.23")]
[assembly: AssemblyFileVersion("1.5.2.23")]
4 changes: 2 additions & 2 deletions Platform/Win32/Build/Res/AssemblyInfo-OpenNI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.2.7")]
[assembly: AssemblyFileVersion("1.5.2.7")]
[assembly: AssemblyVersion("1.5.2.23")]
[assembly: AssemblyFileVersion("1.5.2.23")]
2 changes: 1 addition & 1 deletion Platform/Win32/CreateRedist/RedistMaker.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set MAJOR_VERSION=1
set MINOR_VERSION=5
set MAINTENANCE_VERSION=2
set BUILD_VERSION=7
set BUILD_VERSION=23


@echo ************************
Expand Down
2 changes: 1 addition & 1 deletion Platform/Win32/CreateRedist/UpdateVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
VERSION_MAJOR = 1
VERSION_MINOR = 5
VERSION_MAINTENANCE = 2
VERSION_BUILD = 7
VERSION_BUILD = 23

class UpdateVersion:
def main(self):
Expand Down
2 changes: 1 addition & 1 deletion Platform/Win32/Install/OpenNI/Includes/OpenNIVariables.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<?define MinorVersion=5?>
<?define MaintenanceVersion=2?>
<!-- BuildVersion is NOT used by WiX in the upgrade procedure -->
<?define BuildVersion=7?>
<?define BuildVersion=23?>
<!-- Full version number to display -->
<?define VersionNumber="$(var.MajorVersion).$(var.MinorVersion).$(var.MaintenanceVersion).$(var.BuildVersion)"?>

Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OpenNI (Version 1.5.2.7 - Dec 18th 2011)
----------------------------------------
OpenNI (Version 1.5.2.23 - Dec 28th 2011)
-----------------------------------------

Website: http://www.primesense.com
Forum: http://groups.google.com/group/openni-dev
Expand Down
2 changes: 1 addition & 1 deletion Samples/NiViewer/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void toggleStream(Generator& generator, XnProductionNodeType type, bool* bIsOn)
}
else
{
generator.StartGenerating();
nRetVal = generator.StartGenerating();
if (nRetVal != XN_STATUS_OK)
{
displayMessage("Failed to turn on %s: %s", generator.GetInfo().GetInstanceName(), xnGetStatusString(nRetVal));
Expand Down
2 changes: 1 addition & 1 deletion Source/OpenNI/Linux/XnUSBLinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ XN_C_API XnStatus xnUSBReceiveControl(XN_USB_DEV_HANDLE pDevHandle, XnUSBControl
}
else if (nBytesReceived == 0) // nothing received
{
xnLogWarning(XN_MASK_USB, "Received empty control message!");
// received empty message
return (XN_STATUS_USB_NOT_ENOUGH_DATA);
}
else if (nBytesReceived > nBufferSize) // too much
Expand Down
4 changes: 2 additions & 2 deletions Source/OpenNI/XnOpenNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4475,10 +4475,10 @@ XnStatus xn::PosePrivateData::Init(XnNodeHandle hUserGenerator)

for (XnUInt32 i = 0; i < numTotal; i++)
{
XN_DELETE(arr[i]);
XN_DELETE_ARR(arr[i]);
}

XN_DELETE(arr);
XN_DELETE_ARR(arr);
return nRetVal;
}
XnStatus xn::PosePrivateData::GetPoseStatus(XnUserID userID, const XnChar* poseName, XnUInt64& poseTime, XnPoseDetectionStatus& eStatus, XnPoseDetectionState& eState)
Expand Down
22 changes: 22 additions & 0 deletions Wrappers/OpenNI.java/src/org/OpenNI/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
****************************************************************************/
package org.OpenNI;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class Generator extends ProductionNode
{
Generator(Context context, long nodeHandle, boolean addRef) throws GeneralException
Expand Down Expand Up @@ -113,6 +116,25 @@ public int getDataSize()
{
return NativeMethods.xnGetDataSize(this.toNative());
}

public long getDataPtr()
{
return NativeMethods.xnGetData(this.toNative());
}

public ByteBuffer createDataByteBuffer()
{
int size = getDataSize();
ByteBuffer buffer = ByteBuffer.allocateDirect(size);
buffer.order(ByteOrder.LITTLE_ENDIAN);
NativeMethods.copyToBuffer(buffer, getDataPtr(), size);
return buffer;
}

public void copyDataToBuffer(ByteBuffer buffer, int size)
{
NativeMethods.copyToBuffer(buffer, getDataPtr(), size);
}

public long getTimestamp()
{
Expand Down
4 changes: 2 additions & 2 deletions Wrappers/OpenNI.net/PublisherPolicy.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<dependentAssembly>
<assemblyIdentity name="OpenNI.Net" publicKeyToken="6b43d0c6cf74ee7f"/>
<!-- Redirecting to newest version (we're backwards compatible to versions up to 1.1.0.31). -->
<bindingRedirect oldVersion="1.1.0.31 - 1.5.2.7"
newVersion="1.5.2.7"/>
<bindingRedirect oldVersion="1.1.0.31 - 1.5.2.23"
newVersion="1.5.2.23"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down

0 comments on commit 4dbf64b

Please sign in to comment.