Пример #1
0
        recalibrateMsg MakeBogusRestoreMessage()
        {
            recalibrateMsg theMsg = new recalibrateMsg();

            theMsg.data          = new imgData();
            theMsg.img           = new sm.CompressedImage();
            theMsg.data.cameraID = -1;
            theMsg.data.width    = -1;
            theMsg.data.height   = -1;
            theMsg.data.x        = -1;
            theMsg.data.y        = -1;
            theMsg.data.color    = new m.ColorRGBA();
            theMsg.data.color.r  = -1;
            theMsg.data.color.g  = -1;
            theMsg.data.color.b  = -1;
            theMsg.data.color.a  = -1;
            return(theMsg);
        }
Пример #2
0
        private void PublishRecalibration(int tab_index)
        {
            Dispatcher.Invoke(new Action(() =>
            {
                recalibrateMsg theMsg = new recalibrateMsg();
                theMsg.data           = new imgData();
                theMsg.img            = new sm.CompressedImage();
                theMsg.data.cameraID  = tab_index;
                theMsg.data.width     = (int)mouseBox.Width;
                theMsg.data.height    = (int)mouseBox.Height;
                theMsg.data.x         = (int)(double)mouseBox.GetValue(Canvas.LeftProperty); // ew gross
                theMsg.data.y         = (int)(double)mouseBox.GetValue(Canvas.TopProperty);
                theMsg.data.color     = new m.ColorRGBA();
                theMsg.data.color.r   = boxColor;
                theMsg.data.color.g   = boxColor;
                theMsg.data.color.b   = boxColor;
                theMsg.data.color.a   = boxColor;
                //theMsg.img = (sender as ROS_ImageWPF.CompressedImageControl).latestFrame;
                switch (tab_index)
                {
                case 0:
                    theMsg.img = camImage0.latestFrame;
                    recalPub0.publish(theMsg);
                    break;

                case 1:
                    theMsg.img = camImage1.latestFrame;
                    recalPub1.publish(theMsg);
                    break;

                case 2:
                    theMsg.img = camImage2.latestFrame;
                    recalPub2.publish(theMsg);
                    break;

                case 3:
                    theMsg.img = camImage3.latestFrame;
                    recalPub3.publish(theMsg);
                    break;
                }
                //ROS.spinOnce(nh);
            }));
        }
Пример #3
0
 recalibrateMsg MakeBogusRestoreMessage()
 {
     recalibrateMsg theMsg = new recalibrateMsg();
     theMsg.data = new imgData();
     theMsg.img = new sm.CompressedImage();
     theMsg.data.cameraID = -1;
     theMsg.data.width = -1;
     theMsg.data.height = -1;
     theMsg.data.x = -1;
     theMsg.data.y = -1;
     theMsg.data.color = new m.ColorRGBA();
     theMsg.data.color.r = -1;
     theMsg.data.color.g = -1;
     theMsg.data.color.b = -1;
     theMsg.data.color.a = -1;
     return theMsg;
 }
Пример #4
0
 private void PublishRecalibration(int tab_index)
 {
     Dispatcher.Invoke(new Action(() =>
     {
         recalibrateMsg theMsg = new recalibrateMsg();
         theMsg.data = new imgData();
         theMsg.img = new sm.CompressedImage();
         theMsg.data.cameraID = tab_index;
         theMsg.data.width = (int)mouseBox.Width;
         theMsg.data.height = (int)mouseBox.Height;
         theMsg.data.x = (int)(double)mouseBox.GetValue(Canvas.LeftProperty); // ew gross
         theMsg.data.y = (int)(double)mouseBox.GetValue(Canvas.TopProperty);
         theMsg.data.color = new m.ColorRGBA();
         theMsg.data.color.r = boxColor;
         theMsg.data.color.g = boxColor;
         theMsg.data.color.b = boxColor;
         theMsg.data.color.a = boxColor;
         //theMsg.img = (sender as ROS_ImageWPF.CompressedImageControl).latestFrame;
         switch (tab_index)
         {
             case 0:
                 theMsg.img = camImage0.latestFrame;
                 recalPub0.publish(theMsg);
                 break;
             case 1:
                 theMsg.img = camImage1.latestFrame;
                 recalPub1.publish(theMsg);
                 break;
             case 2:
                 theMsg.img = camImage2.latestFrame;
                 recalPub2.publish(theMsg);
                 break;
             case 3:
                 theMsg.img = camImage3.latestFrame;
                 recalPub3.publish(theMsg);
                 break;
         }
         //ROS.spinOnce(nh);
     }));
 }