HypothesisVisualization.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package
19  * @author
20  * @date
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 #pragma once
25 
27 #include "ObjectHypothesis.h"
28 
29 // OpenCV
30 #include <opencv2/opencv.hpp>
31 
32 //IVT
33 #include <Image/IplImageAdaptor.h>
34 
35 class CCalibration;
36 class CByteImage;
37 
38 
40 {
41 public:
42  CHypothesisVisualization(CCalibration* calibration);
44 
45  bool VisualizeHypotheses(const CByteImage* pByteImageColorLeft, const CByteImage* pByteImageColorRight, const CObjectHypothesisArray& aHypotheses,
46  const CSIFTFeatureArray& aAllPoints, std::vector<CMSERDescriptor3D*>& aAllMSERs, std::vector<CMSERDescriptor3D*>& aCorrespondingMSERs,
47  bool bConfirmedHypotheses, CByteImage* pResultImageLeft = NULL, CByteImage* pResultImageRight = NULL,
48  const bool bMakeScreenshot = false, const bool bIsLeftImage = true);
49 
50  void RefreshVisualization(bool bConfirmedHypotheses);
51 
52 private:
53 
54  void MarkConfirmedPoint(CByteImage* pImage, int x, int y, CvScalar cColor);
55  void MarkUnconfirmedPoint(CByteImage* pImage, int x, int y, CvScalar cColor);
56 
57  CCalibration* calibration;
58  IplImage* m_pIplImageLeft, *m_pIplImageRight, *m_pIplImageLeftRectified, *m_pIplImageRightRectified, *m_pIplImageDisparity, *m_pOldVisualizationImageIpl;
59 
60  CvScalar* colors;
61 
62  CByteImage* screenshotImage, *segmentationImage, *segmentedCameraImage;
63  std::string screenshotFileName, segmentationImageFileName, segmentedCameraImageFileName;
64  int screenshotCounter;
65 };
ObjectHypothesis.h
CSIFTFeatureArray
CDynamicArrayTemplate< CSIFTFeatureEntry * > CSIFTFeatureArray
Definition: ObjectHypothesis.h:168
ObjectLearningByPushingDefinitions.h
CHypothesisVisualization
Definition: HypothesisVisualization.h:39
CHypothesisVisualization::CHypothesisVisualization
CHypothesisVisualization(CCalibration *calibration)
Definition: HypothesisVisualization.cpp:47
CHypothesisVisualization::~CHypothesisVisualization
~CHypothesisVisualization(void)
Definition: HypothesisVisualization.cpp:117
CHypothesisVisualization::RefreshVisualization
void RefreshVisualization(bool bConfirmedHypotheses)
Definition: HypothesisVisualization.cpp:388
CObjectHypothesisArray
CDynamicArrayTemplate< CObjectHypothesis * > CObjectHypothesisArray
Definition: ObjectHypothesis.h:359
CHypothesisVisualization::VisualizeHypotheses
bool VisualizeHypotheses(const CByteImage *pByteImageColorLeft, const CByteImage *pByteImageColorRight, const CObjectHypothesisArray &aHypotheses, const CSIFTFeatureArray &aAllPoints, std::vector< CMSERDescriptor3D * > &aAllMSERs, std::vector< CMSERDescriptor3D * > &aCorrespondingMSERs, bool bConfirmedHypotheses, CByteImage *pResultImageLeft=NULL, CByteImage *pResultImageRight=NULL, const bool bMakeScreenshot=false, const bool bIsLeftImage=true)
Definition: HypothesisVisualization.cpp:136