[Jderobot-admin] jderobot-r944 - in trunk/src/components: kinectViewer openniServer

frivas en jderobot.org frivas en jderobot.org
Jue Jul 18 07:43:51 CEST 2013


Author: frivas
Date: 2013-07-18 07:42:51 +0200 (Thu, 18 Jul 2013)
New Revision: 944

Modified:
   trunk/src/components/kinectViewer/kinectViewer.cfg
   trunk/src/components/openniServer/openniServer.cfg
   trunk/src/components/openniServer/openniServer.cpp
Log:
cambios en openniServer y subidas las nuevas configuraciones de kinectviewer y openniserver	



Modified: trunk/src/components/kinectViewer/kinectViewer.cfg
===================================================================
--- trunk/src/components/kinectViewer/kinectViewer.cfg	2013-07-16 11:20:14 UTC (rev 943)
+++ trunk/src/components/kinectViewer/kinectViewer.cfg	2013-07-18 05:42:51 UTC (rev 944)
@@ -1,16 +1,19 @@
-kinectViewer.CameraRGBActive=0
-#kinectViewer.CameraRGB.Proxy=cameraRGB:tcp -h 193.147.14.20 -p 9999
-kinectViewer.CameraDEPTHActive=0
-#kinectViewer.CameraDEPTH.Proxy=cameraDepth:tcp -h 193.147.14.20 -p 9999
-#kinectViewer.pointCloudActive=1
-#kinectViewer.pointCloud.Proxy=pointcloud1:tcp -h 193.147.14.20 -p 9999
+kinectViewer.CameraRGBActive=1
+kinectViewer.CameraRGB.Fps=10
+kinectViewer.CameraRGB.Proxy=cameraA:tcp -h localhost -p 9998
+kinectViewer.CameraDEPTHActive=1
+kinectViewer.CameraDEPTH.Fps=10
+kinectViewer.CameraDEPTH.Proxy=cameraB:tcp -h localhost -p 9998
+kinectViewer.pointCloudActive=0
+kinectViewer.pointCloud.Fps=10
+kinectViewer.pointCloud.Proxy=pointcloud1:tcp -h localhost -p 9998
 kinectViewer.Pose3DMotorsActive=0
-#kinectViewer.Pose3DMotors.Proxy=Pose3DMotors1:tcp -h 193.147.14.20 -p 9999
+kinectViewer.Pose3DMotors.Proxy=Pose3DMotors1:tcp -h localhost -p 9999
 kinectViewer.KinectLedsActive=0
-#kinectViewer.KinectLeds.Proxy=kinectleds1:tcp -h 193.147.14.20 -p 9999
-#kinectViewer.WorldFile=./config/lambecom.cfg
-kinectViewer.camRGB=./config/camRGB
-kinectViewer.camIR=./config/camIR
-
-kinectViewer.pointCloudActive=1
-kinectViewer.pointCloud.Proxy=pointcloud1:tcp -h localhost -p 9999
+kinectViewer.KinectLeds.Proxy=kinectleds1:tcp -h localhost -p 9999
+kinectViewer.WorldFile=./config/lambecom.cfg
+#kinectViewer.camRGB=./config/camera-0.cfg
+#kinectViewer.camIR=./config/camera-0.cfg
+kinectViewer.Height=240
+kinectViewer.Width=320
+kinectViewer.Fps=15

Modified: trunk/src/components/openniServer/openniServer.cfg
===================================================================
--- trunk/src/components/openniServer/openniServer.cfg	2013-07-16 11:20:14 UTC (rev 943)
+++ trunk/src/components/openniServer/openniServer.cfg	2013-07-18 05:42:51 UTC (rev 944)
@@ -3,10 +3,10 @@
 #with registry
 #cameras configuration
 openniServer.NCameras=1
-openniServer.PlayerDetection=1
+openniServer.PlayerDetection=0
 openniServer.Width=320
 openniServer.Height=240
-openniServer.fps=25
+openniServer.Fps=20
 
 #camera 1
 openniServer.deviceId=0
@@ -21,11 +21,15 @@
 openniServer.CameraDEPTH.fps=10
 openniServer.CameraDEPTH.PlayerDetection=0
 
+openniServer.PointCloud.Name=pointcloud1
 
+
+
 #Other components
 openniServer.CameraRGB=1
 openniServer.CameraDEPTH=1
-openniServer.pointCloudActive=1
+openniServer.pointCloudActive=0
 openniServer.pointCloud.Fps=10
 openniServer.Pose3DMotorsActive=0
 openniServer.KinectLedsActive=0
+

Modified: trunk/src/components/openniServer/openniServer.cpp
===================================================================
--- trunk/src/components/openniServer/openniServer.cpp	2013-07-16 11:20:14 UTC (rev 943)
+++ trunk/src/components/openniServer/openniServer.cpp	2013-07-18 05:42:51 UTC (rev 944)
@@ -106,7 +106,7 @@
 
 struct timeval a,b;
 
-int segmentationType=1; //0 ninguna, 1 NITE, 2 fondo
+int segmentationType; //0 ninguna, 1 NITE, 2 fondo
 
 
 
@@ -512,7 +512,7 @@
 				const openni::RGB888Pixel* pImage = pImageRow;
 				for (int x = 0; x < m_colorFrame.getWidth(); ++x, ++pImage)
 				{
-					switch(segmentationType){
+					switch(segmentation){
 						case 0:
 							srcRGB->data[(y*m_colorFrame.getWidth() + x)*3 + 0] = pImage->r;
 							srcRGB->data[(y*m_colorFrame.getWidth() + x)*3 + 1] = pImage->g;
@@ -555,8 +555,6 @@
 			}	
 	
 
-			cv::imshow("color", *srcRGB);
-
 			//test
 			//CalculateJoints();
 
@@ -771,7 +769,7 @@
 			{	
 				for (int x = 0; x < m_depthFrame.getWidth(); ++x, ++pDepth)
 				{
-					switch(segmentationType){
+					switch(segmentation){
 						case 0:
 							distances[(y*m_depthFrame.getWidth() + x)] = *pDepth;
 							if (*pDepth != 0)
@@ -807,13 +805,6 @@
 							#endif
 							break;
 						case 2:
-							distances[(y*m_depthFrame.getWidth() + x)] = *pDepth;
-							if (*pDepth != 0)
-							{
-								src.data[(y*m_depthFrame.getWidth()+ x)*3+0] = (float(*pDepth)/(float)MAX_LENGHT)*255.;
-								src.data[(y*m_depthFrame.getWidth()+ x)*3+1] = (*pDepth)>>8;
-								src.data[(y*m_depthFrame.getWidth()+ x)*3+2] = (*pDepth)&0xff;
-							}
 							break;
 						default:
 							std::cout << "openniServer: Error segmentation not supported" << std::endl;
@@ -1142,7 +1133,8 @@
 	int motors = prop->getPropertyAsIntWithDefault(componentPrefix + ".Pose3DMotorsActive",0);
 	int leds = prop->getPropertyAsIntWithDefault(componentPrefix + ".KinectLedsActive",0);
 	int pointCloud = prop->getPropertyAsIntWithDefault(componentPrefix + ".pointCloudActive",0);
-	int playerdetection = prop->getPropertyAsIntWithDefault(componentPrefix + ".PlayerDetection",0);
+	openniServer::segmentationType= prop->getPropertyAsIntWithDefault(componentPrefix + ".PlayerDetection",0);
+
 	configWidth=prop->getPropertyAsIntWithDefault(componentPrefix + ".Width", 640);
 	configHeight=prop->getPropertyAsIntWithDefault(componentPrefix+ ".Height",480);
 	configFps=prop->getPropertyAsIntWithDefault(componentPrefix + ".Fps",30);
@@ -1151,7 +1143,7 @@
 
 
 
-	if (playerdetection){
+	if (openniServer::segmentationType){
 		cameraR=1;
 		cameraD=1;
 	}



More information about the Jderobot-admin mailing list