Пример #1
0
void ArucoThread::detectMarkerFromImage( cv::Mat image )
{
	ArucoCore aCore;
	aCore.detect( image );
	cv::Mat frame;
	frame = aCore.getDetectedRectangleImage();
	emit pushImageFromKinect( frame.clone() );
}
Пример #2
0
void OpenCV::OpenCVCore::createConnectionKinect()
{

	//for video sending
	QObject::connect( mOpencvWindow,
					  SIGNAL( sendImageKinect( bool ) ),
					  mThrKinect,
					  SLOT( setImageSend( bool ) ) );

	//send image to label
	QObject::connect( mThrKinect,
					  SIGNAL( pushImage( cv::Mat ) ),
					  mOpencvWindow,
					  SLOT( setLabel( cv::Mat ) ) );

	//start
	QObject::connect( mOpencvWindow,
					  SIGNAL( startKinect() ),
					  mThrKinect,
					  SLOT( start() ) );

	//stop
	QObject::connect( mOpencvWindow,
					  SIGNAL( stopKinect( bool ) ),
					  mThrKinect,
					  SLOT( setCancel( bool ) ) );

	// moving camera with gesture
	QObject::connect( mThrKinect,
					  SIGNAL( sendSliderCoords( float,float,float ) ),
					  AppCore::Core::getInstance( NULL )->getCoreWindow()->getCameraManipulator(),
					  SLOT( setRotationHeadKinect( float,float,float ) ) );

	//enable/disable cursor movement
	QObject::connect( mOpencvWindow,
					  SIGNAL( setMovementCursor( bool ) ),
					  mThrKinect,
					  SLOT( setCursorMovement( bool ) ) );

	//enable/disable zoom
	QObject::connect( mOpencvWindow,
					  SIGNAL( setZoom( bool ) ),
					  mThrKinect,
					  SLOT( setZoomUpdate( bool ) ) );

	//edit for speed movement
	QObject::connect( mOpencvWindow,
					  SIGNAL( sendSpeedKinect( double ) ),
					  mThrKinect,
					  SLOT( setSpeedKinect( double ) ) );

	//edit for speed movement
	QObject::connect( mOpencvWindow,
					  SIGNAL( inicializeKinect() ),
					  mThrKinect,
					  SLOT( inicializeKinect() ) );

	//edit for speed movement
	QObject::connect( mOpencvWindow,
					  SIGNAL( closeActionOpenni() ),
					  mThrKinect,
					  SLOT( closeActionOpenni() ) );

	QObject::connect( mOpencvWindow,
					  SIGNAL( setKinectMarkerDetection( bool ) ),
					  mThrKinect,
					  SLOT( setImageSendToMarkerDetection( bool ) ) );

	//enable/disable sending picture to Marker Detection
	QObject::connect( mThrKinect,
					  SIGNAL( pushImageToMarkerDetection( cv::Mat ) ),
					  mThrAruco,
					  SLOT( detectMarkerFromImage( cv::Mat ) ) );

	//send augmented Image created in Kinect
	QObject::connect( mThrAruco,
					  SIGNAL( pushImageFromKinect( cv::Mat ) ),
					  mOpencvWindow,
					  SLOT( setLabel( cv::Mat ) ) );
	QObject::connect( mOpencvWindow,
					  SIGNAL( setKinectCaptureImage( bool ) ),
					  mThrKinect,
					  SLOT( setCaptureImage( bool ) ) );
}