Permalink
Browse files

fix build examples & under GCC

  • Loading branch information...
jlblancoc committed Nov 18, 2017
1 parent 06242cd commit 4573cb996856d8600e92dd70950991efa45de045
@@ -45,7 +45,7 @@ CGlWidget::CGlWidget(bool is2D, QWidget* parent)
m_observationSize(10.),
m_observationColor(mrpt::utils::TColor::red()),
m_selectedObsSize(15.0),
m_selectedColor(mrpt::utils::TColor::green),
m_selectedColor(mrpt::utils::TColor::green()),
m_isShowObs(false),
m_visiblePoints(mrpt::make_aligned_shared<CSetOfObjects>()),
m_currentObs(opengl::stock_objects::CornerXYZSimple()),
@@ -13,8 +13,8 @@
#include <mrpt/system/os.h>
#include <mrpt/utils/CImage.h>
int LINUX_IMG_WIDTH_value = 800;
int LINUX_IMG_HEIGHT_value = 600;
static int LINUX_IMG_WIDTH_value = 800;
static int LINUX_IMG_HEIGHT_value = 600;
using namespace mrpt;
using namespace mrpt::utils;
@@ -25,7 +25,7 @@ int CEnhancedMetaFile::LINUX_IMG_WIDTH() { return LINUX_IMG_WIDTH_value; }
void CEnhancedMetaFile::LINUX_IMG_HEIGHT(int value) { LINUX_IMG_HEIGHT_value = value; }
int CEnhancedMetaFile::LINUX_IMG_HEIGHT() { return LINUX_IMG_HEIGHT_value; }
#include <MRPT/config.h>
#include <mrpt/config.h>
#ifdef MRPT_OS_WINDOWS
#include <windows.h>
#endif
@@ -43,13 +43,10 @@ CEnhancedMetaFile::CEnhancedMetaFile(
CreateEnhMetaFileA(nullptr, targetFileName.c_str(), nullptr, nullptr);
if (!m_hdc.get()) THROW_EXCEPTION("Can't create EMF file!!!");
#else
m_hdc = (void*)new CImage(
CEnhancedMetaFile::LINUX_IMG_WIDTH_value,
CEnhancedMetaFile::LINUX_IMG_HEIGHT_value);
m_hdc = (void*)new CImage(LINUX_IMG_WIDTH_value,LINUX_IMG_HEIGHT_value);
((CImage*)m_hdc.get())
->filledRectangle(
0, 0, CEnhancedMetaFile::LINUX_IMG_WIDTH_value - 1,
CEnhancedMetaFile::LINUX_IMG_HEIGHT_value - 1, TColor(0, 0, 0));
->filledRectangle(0, 0, LINUX_IMG_WIDTH_value - 1,
LINUX_IMG_HEIGHT_value - 1, TColor(0, 0, 0));
#endif
}
@@ -117,10 +117,10 @@ class CDisplayWindow : public mrpt::gui::CBaseGUIWindow
// Print the 4 tile lines
unsigned int w = imgColor.getWidth();
unsigned int h = imgColor.getHeight();
imgColor.line(0, h / 2, w - 1, h / 2, TColor::green);
imgColor.line(w / 4, 0, w / 4, h, TColor::green);
imgColor.line(w / 2, 0, w / 2, h, TColor::green);
imgColor.line(3 * w / 4, 0, 3 * w / 4, h, TColor::green);
imgColor.line(0, h / 2, w - 1, h / 2, TColor::green());
imgColor.line(w / 4, 0, w / 4, h, TColor::green());
imgColor.line(w / 2, 0, w / 2, h, TColor::green());
imgColor.line(3 * w / 4, 0, 3 * w / 4, h, TColor::green());
showImageAndPoints(imgColor, list, color);
@@ -73,7 +73,7 @@ IF(BUILD_mrpt-opengl)
ENDIF()
# Link against gl, glu, glut:
TARGET_LINK_LIBRARIES(mrpt-opengl ${MRPT_OPENGL_LIBS})
TARGET_LINK_LIBRARIES(mrpt-opengl ${MRPT_OPENGL_LIBS} ${MRPT_3DS_LIBS})
# Link against assimp:
IF (CMAKE_MRPT_HAS_ASSIMP)
@@ -328,11 +328,11 @@ void TestMatchingComparative()
copyInfoImage = infoimage;
copyjoinimage = joinimage;
copyjoinimage.line(
(*it1)->x, 0, (*it1)->x, imH, TColor::green); // Horiz
(*it1)->x, 0, (*it1)->x, imH, TColor::green()); // Horiz
copyjoinimage.line(
(*it1)->x + imW, 0, (*it1)->x + imW, imH, TColor::green); // Horiz
(*it1)->x + imW, 0, (*it1)->x + imW, imH, TColor::green()); // Horiz
copyjoinimage.line(
0, (*it1)->y, imW + imW, (*it1)->y, TColor::green); // Epipolar
0, (*it1)->y, imW + imW, (*it1)->y, TColor::green()); // Epipolar
copyjoinimage.drawCircle(
(*it1)->x, (*it1)->y, 4, TColor::green, 2); // Keypoint
@@ -390,7 +390,7 @@ void TestMatchingComparative()
{
copyjoinimage.line(
(*it1)->x + imW, 0, (*it1)->x + imW, imH,
TColor::green); // Limit line (only the first time)
TColor::green()); // Limit line (only the first time)
firstMatch = false;
} // end-if
@@ -437,15 +437,15 @@ void TestMatchingComparative()
} // end if
} // end for it2
copyInfoImage.textOut(
80 + idxsad * 50, imH2 - 53, format("%.2f", minsad), TColor::green);
80 + idxsad * 50, imH2 - 53, format("%.2f", minsad), TColor::green());
copyInfoImage.textOut(
80 + idxncc * 50, imH2 - 41, format("%.2f", maxncc), TColor::green);
80 + idxncc * 50, imH2 - 41, format("%.2f", maxncc), TColor::green());
copyInfoImage.textOut(
80 + idxsiftd * 50, imH2 - 29, format("%.2f", minsiftd),
TColor::green);
TColor::green());
copyInfoImage.textOut(
80 + idxsurfd * 50, imH2 - 17, format("%.2f", minsurfd),
TColor::green);
TColor::green());
win.showImage(copyjoinimage);
win2.showImage(copyInfoImage);
@@ -131,7 +131,7 @@ void TestImageFFT()
aux.drawImage(0, 0, IM2);
aux.rectangle(
u, v, u - IM1.getWidth() / 2, v - IM1.getHeight() / 2,
TColor::white, 2);
TColor::white(), 2);
win.showImage(aux);
win.setPos(30, 30);
@@ -331,11 +331,11 @@ void TestMatchingComparative()
copyInfoImage = infoimage;
copyjoinimage = joinimage;
copyjoinimage.line(
(*it1)->x, 0, (*it1)->x, imH, TColor::green); // Horiz
(*it1)->x, 0, (*it1)->x, imH, TColor::green()); // Horiz
copyjoinimage.line(
(*it1)->x + imW, 0, (*it1)->x + imW, imH, TColor::green); // Horiz
(*it1)->x + imW, 0, (*it1)->x + imW, imH, TColor::green()); // Horiz
copyjoinimage.line(
0, (*it1)->y, imW + imW, (*it1)->y, TColor::green); // Epipolar
0, (*it1)->y, imW + imW, (*it1)->y, TColor::green()); // Epipolar
copyjoinimage.drawCircle(
(*it1)->x, (*it1)->y, 4, TColor::green, 2); // Keypoint
@@ -393,7 +393,7 @@ void TestMatchingComparative()
{
copyjoinimage.line(
(*it1)->x + imW, 0, (*it1)->x + imW, imH,
TColor::green); // Limit line (only the first time)
TColor::green()); // Limit line (only the first time)
firstMatch = false;
} // end-if
@@ -440,15 +440,15 @@ void TestMatchingComparative()
} // end if
} // end for it2
copyInfoImage.textOut(
80 + idxsad * 50, imH2 - 53, format("%.2f", minsad), TColor::green);
80 + idxsad * 50, imH2 - 53, format("%.2f", minsad), TColor::green());
copyInfoImage.textOut(
80 + idxncc * 50, imH2 - 41, format("%.2f", maxncc), TColor::green);
80 + idxncc * 50, imH2 - 41, format("%.2f", maxncc), TColor::green());
copyInfoImage.textOut(
80 + idxsiftd * 50, imH2 - 29, format("%.2f", minsiftd),
TColor::green);
TColor::green());
copyInfoImage.textOut(
80 + idxsurfd * 50, imH2 - 17, format("%.2f", minsurfd),
TColor::green);
TColor::green());
win.showImage(copyjoinimage);
win2.showImage(copyInfoImage);

0 comments on commit 4573cb9

Please sign in to comment.