diff --git a/include/control.h b/include/control.h index 14ad1e4127285e251063a120bcd9768295c014fb..659e3a43f407dda1f7ebf9d3660338f7410b3e04 100644 --- a/include/control.h +++ b/include/control.h @@ -591,6 +591,12 @@ private slots: void setMoCapSize(int size); void toggleRecoROIButtons(); void toggleTrackROIButtons(); + void on_boardSizeX_valueChanged(int arg1); + + void on_boardSizeY_valueChanged(int arg1); + + void on_squareSize_valueChanged(double arg1); + signals: void userChangedRecoMethod(reco::RecognitionMethod method); diff --git a/src/control.cpp b/src/control.cpp index 995a0c0523424fb181ddfc802fc7612f4e733d61..2834cc421e0f01b51231d12d28a9cb643f6271bb 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -2504,6 +2504,22 @@ void Control::on_newModelCheckBox_stateChanged(int i) } intrError->setText(QString("invalid")); } + +void Control::on_boardSizeX_valueChanged(int x) +{ + mMainWindow->getAutoCalib()->setBoardSizeX(x); +} + +void Control::on_boardSizeY_valueChanged(int y) +{ + mMainWindow->getAutoCalib()->setBoardSizeY(y); +} + +void Control::on_squareSize_valueChanged(double s) +{ + mMainWindow->getAutoCalib()->setSquareSize(s); +} + void Control::on_autoCalib_clicked() { mMainWindow->getAutoCalib()->autoCalib(); @@ -3470,17 +3486,15 @@ void Control::getXml(QDomElement &elem) { if(subSubElem.hasAttribute("BOARD_SIZE_X")) { - mMainWindow->getAutoCalib()->setBoardSizeX(subSubElem.attribute("BOARD_SIZE_X").toInt()); // 6 + boardSizeX->setValue(subSubElem.attribute("BOARD_SIZE_X").toInt()); } if(subSubElem.hasAttribute("BOARD_SIZE_Y")) { - mMainWindow->getAutoCalib()->setBoardSizeY( - subSubElem.attribute("BOARD_SIZE_Y").toInt()); // 8 oder 9 + boardSizeY->setValue(subSubElem.attribute("BOARD_SIZE_Y").toInt()); } if(subSubElem.hasAttribute("SQUARE_SIZE")) { - mMainWindow->getAutoCalib()->setSquareSize( - subSubElem.attribute("SQUARE_SIZE").toDouble()); // in cm + squareSize->setValue(subSubElem.attribute("SQUARE_SIZE").toDouble()); } } else if(subSubElem.tagName() == "INTRINSIC_PARAMETERS") diff --git a/ui/control.ui b/ui/control.ui index 16725d9e54c1202e56f3b4b8e705aef6c14689e3..02ca61b6e9dda3c3a9c8227cd237f726acf44323 100644 --- a/ui/control.ui +++ b/ui/control.ui @@ -135,9 +135,9 @@ <property name="geometry"> <rect> <x>0</x> - <y>-187</y> - <width>476</width> - <height>1328</height> + <y>-411</y> + <width>465</width> + <height>1363</height> </rect> </property> <property name="sizePolicy"> @@ -1134,6 +1134,77 @@ </item> </layout> </item> + <item> + <layout class="QGridLayout" name="ChessboardPropertiesLayout"> + <item row="4" column="1"> + <widget class="QLabel" name="squareSizeLabel"> + <property name="text"> + <string>square size [cm]:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="chessboardProperties"> + <property name="text"> + <string>chessboard properties:</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLabel" name="boardSizeXLabel"> + <property name="text"> + <string>board size: x:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="4" column="2"> + <widget class="QDoubleSpinBox" name="squareSize"> + <property name="singleStep"> + <double>0.100000000000000</double> + </property> + <property name="value"> + <double>4.600000000000000</double> + </property> + </widget> + </item> + <item row="3" column="3"> + <widget class="QLabel" name="boardSizeYLabel"> + <property name="text"> + <string>y:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QSpinBox" name="boardSizeX"> + <property name="toolTip"> + <string>Number of squares in a row</string> + </property> + <property name="value"> + <number>6</number> + </property> + </widget> + </item> + <item row="3" column="4"> + <widget class="QSpinBox" name="boardSizeY"> + <property name="toolTip"> + <string>Number of squares in a column</string> + </property> + <property name="value"> + <number>8</number> + </property> + </widget> + </item> + </layout> + </item> <item> <layout class="QGridLayout"> <property name="leftMargin"> @@ -1151,6 +1222,13 @@ <property name="spacing"> <number>4</number> </property> + <item row="0" column="1"> + <widget class="QPushButton" name="calibFiles"> + <property name="text"> + <string>files</string> + </property> + </widget> + </item> <item row="0" column="0"> <widget class="QPushButton" name="autoCalib"> <property name="enabled"> @@ -1161,13 +1239,6 @@ </property> </widget> </item> - <item row="0" column="1"> - <widget class="QPushButton" name="calibFiles"> - <property name="text"> - <string>files</string> - </property> - </widget> - </item> </layout> </item> </layout> @@ -1634,30 +1705,11 @@ <property name="spacing"> <number>4</number> </property> - <item row="0" column="0"> - <widget class="QLabel" name="label_54"> - <property name="toolTip"> - <string>Translate the coordinate system in x-direction.</string> - </property> - <property name="text"> - <string>translate [cm] x:</string> - </property> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QScrollBar" name="coord3DTransX"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> + <item row="0" column="2"> + <widget class="QSpinBox" name="coord3DTransX_spin"> <property name="minimumSize"> <size> - <width>50</width> + <width>0</width> <height>17</height> </size> </property> @@ -1676,22 +1728,10 @@ <property name="maximum"> <number>10000</number> </property> - <property name="pageStep"> - <number>10</number> - </property> - <property name="value"> - <number>0</number> - </property> - <property name="sliderPosition"> - <number>0</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> </widget> </item> - <item row="0" column="2"> - <widget class="QSpinBox" name="coord3DTransX_spin"> + <item row="2" column="2"> + <widget class="QSpinBox" name="coord3DTransZ_spin"> <property name="minimumSize"> <size> <width>0</width> @@ -1705,7 +1745,7 @@ </size> </property> <property name="toolTip"> - <string>Translate the coordinate system in x-direction.</string> + <string>2D: Rotate the coordinate system clockwise. 3D: Translate the coordinate system in z-direction.</string> </property> <property name="minimum"> <number>-10000</number> @@ -1715,21 +1755,8 @@ </property> </widget> </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_55"> - <property name="toolTip"> - <string>Translate the coordinate system in y-direction.</string> - </property> - <property name="text"> - <string>y:</string> - </property> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QScrollBar" name="coord3DTransY"> + <item row="1" column="2"> + <widget class="QSpinBox" name="coord3DTransY_spin"> <property name="minimumSize"> <size> <width>0</width> @@ -1751,19 +1778,10 @@ <property name="maximum"> <number>10000</number> </property> - <property name="value"> - <number>0</number> - </property> - <property name="sliderPosition"> - <number>0</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> </widget> </item> - <item row="1" column="2"> - <widget class="QSpinBox" name="coord3DTransY_spin"> + <item row="2" column="1"> + <widget class="QScrollBar" name="coord3DTransZ"> <property name="minimumSize"> <size> <width>0</width> @@ -1777,7 +1795,7 @@ </size> </property> <property name="toolTip"> - <string>Translate the coordinate system in y-direction.</string> + <string>2D: Rotate the coordinate system clockwise. 3D: Translate the coordinate system in z-direction.</string> </property> <property name="minimum"> <number>-10000</number> @@ -1785,26 +1803,28 @@ <property name="maximum"> <number>10000</number> </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_57"> - <property name="toolTip"> - <string>2D: Rotate the coordinate system clockwise. 3D: Translate the coordinate system in z-direction.</string> + <property name="pageStep"> + <number>10</number> </property> - <property name="text"> - <string>z:</string> + <property name="sliderPosition"> + <number>0</number> </property> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + <property name="orientation"> + <enum>Qt::Horizontal</enum> </property> </widget> </item> - <item row="2" column="1"> - <widget class="QScrollBar" name="coord3DTransZ"> + <item row="0" column="1"> + <widget class="QScrollBar" name="coord3DTransX"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="minimumSize"> <size> - <width>0</width> + <width>50</width> <height>17</height> </size> </property> @@ -1815,7 +1835,7 @@ </size> </property> <property name="toolTip"> - <string>2D: Rotate the coordinate system clockwise. 3D: Translate the coordinate system in z-direction.</string> + <string>Translate the coordinate system in x-direction.</string> </property> <property name="minimum"> <number>-10000</number> @@ -1826,6 +1846,9 @@ <property name="pageStep"> <number>10</number> </property> + <property name="value"> + <number>0</number> + </property> <property name="sliderPosition"> <number>0</number> </property> @@ -1834,8 +1857,8 @@ </property> </widget> </item> - <item row="2" column="2"> - <widget class="QSpinBox" name="coord3DTransZ_spin"> + <item row="1" column="1"> + <widget class="QScrollBar" name="coord3DTransY"> <property name="minimumSize"> <size> <width>0</width> @@ -1849,7 +1872,7 @@ </size> </property> <property name="toolTip"> - <string>2D: Rotate the coordinate system clockwise. 3D: Translate the coordinate system in z-direction.</string> + <string>Translate the coordinate system in y-direction.</string> </property> <property name="minimum"> <number>-10000</number> @@ -1857,6 +1880,28 @@ <property name="maximum"> <number>10000</number> </property> + <property name="value"> + <number>0</number> + </property> + <property name="sliderPosition"> + <number>0</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_57"> + <property name="toolTip"> + <string>2D: Rotate the coordinate system clockwise. 3D: Translate the coordinate system in z-direction.</string> + </property> + <property name="text"> + <string>z:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item row="3" column="0"> @@ -1872,8 +1917,34 @@ </property> </widget> </item> - <item row="3" column="1"> - <widget class="QScrollBar" name="coord3DAxeLen"> + <item row="1" column="0"> + <widget class="QLabel" name="label_55"> + <property name="toolTip"> + <string>Translate the coordinate system in y-direction.</string> + </property> + <property name="text"> + <string>y:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_54"> + <property name="toolTip"> + <string>Translate the coordinate system in x-direction.</string> + </property> + <property name="text"> + <string>translate [cm] x:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QSpinBox" name="coord3DAxeLen_spin"> <property name="minimumSize"> <size> <width>0</width> @@ -1889,6 +1960,9 @@ <property name="toolTip"> <string>Scale the coordinate system.</string> </property> + <property name="suffix"> + <string> cm</string> + </property> <property name="minimum"> <number>1</number> </property> @@ -1898,16 +1972,10 @@ <property name="value"> <number>200</number> </property> - <property name="sliderPosition"> - <number>200</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> </widget> </item> - <item row="3" column="2"> - <widget class="QSpinBox" name="coord3DAxeLen_spin"> + <item row="3" column="1"> + <widget class="QScrollBar" name="coord3DAxeLen"> <property name="minimumSize"> <size> <width>0</width> @@ -1923,9 +1991,6 @@ <property name="toolTip"> <string>Scale the coordinate system.</string> </property> - <property name="suffix"> - <string> cm</string> - </property> <property name="minimum"> <number>1</number> </property> @@ -1935,6 +2000,12 @@ <property name="value"> <number>200</number> </property> + <property name="sliderPosition"> + <number>200</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> </widget> </item> </layout> @@ -3441,7 +3512,7 @@ <x>0</x> <y>0</y> <width>465</width> - <height>991</height> + <height>974</height> </rect> </property> <property name="sizePolicy"> @@ -3581,7 +3652,6 @@ <widget class="QLabel" name="recoNumberNow"> <property name="font"> <font> - <weight>75</weight> <bold>true</bold> </font> </property> @@ -4730,7 +4800,7 @@ <x>0</x> <y>0</y> <width>465</width> - <height>1203</height> + <height>1170</height> </rect> </property> <property name="sizePolicy"> @@ -4923,7 +4993,6 @@ <widget class="QLabel" name="trackNumberNow"> <property name="font"> <font> - <weight>75</weight> <bold>true</bold> </font> </property> @@ -4964,7 +5033,6 @@ <widget class="QLabel" name="trackNumberVisible"> <property name="font"> <font> - <weight>75</weight> <bold>true</bold> </font> </property> @@ -4980,7 +5048,6 @@ <widget class="QLabel" name="trackNumberAll"> <property name="font"> <font> - <weight>75</weight> <bold>true</bold> </font> </property> @@ -7586,7 +7653,7 @@ <x>0</x> <y>0</y> <width>479</width> - <height>553</height> + <height>554</height> </rect> </property> <property name="sizePolicy"> @@ -7771,48 +7838,48 @@ </customwidget> </customwidgets> <tabstops> - <tabstop>fx</tabstop> - <tabstop>fy</tabstop> - <tabstop>cx</tabstop> - <tabstop>cy</tabstop> - <tabstop>r2</tabstop> - <tabstop>r4</tabstop> - <tabstop>tx</tabstop> - <tabstop>ty</tabstop> - <tabstop>gridTransY_spin</tabstop> - <tabstop>gridScale_spin</tabstop> - <tabstop>gridTransX_spin</tabstop> - <tabstop>gridRot_spin</tabstop> - <tabstop>coordTransY_spin</tabstop> - <tabstop>coordScale_spin</tabstop> - <tabstop>coordTransX_spin</tabstop> - <tabstop>coordRotate_spin</tabstop> - <tabstop>coordAltitude</tabstop> - <tabstop>coordUnit</tabstop> - <tabstop>coordUseIntrinsic</tabstop> <tabstop>filterBrightContrast</tabstop> <tabstop>filterBorder</tabstop> <tabstop>filterBorderParamCol</tabstop> + <tabstop>filterBgShow</tabstop> + <tabstop>filterBgUpdate</tabstop> <tabstop>filterBg</tabstop> <tabstop>filterBgReset</tabstop> <tabstop>filterBgLoad</tabstop> <tabstop>filterBgSave</tabstop> + <tabstop>filterBgDeleteTrj</tabstop> + <tabstop>filterBgDeleteNumber</tabstop> <tabstop>filterSwap</tabstop> <tabstop>filterSwapH</tabstop> <tabstop>filterSwapV</tabstop> - <tabstop>autoCalib</tabstop> - <tabstop>calibFiles</tabstop> - <tabstop>fixCenter</tabstop> + <tabstop>apply</tabstop> + <tabstop>fx</tabstop> + <tabstop>fy</tabstop> + <tabstop>cx</tabstop> + <tabstop>cy</tabstop> + <tabstop>r2</tabstop> + <tabstop>r4</tabstop> + <tabstop>r6</tabstop> + <tabstop>tx</tabstop> + <tabstop>ty</tabstop> + <tabstop>k4</tabstop> + <tabstop>k5</tabstop> + <tabstop>k6</tabstop> + <tabstop>s1</tabstop> + <tabstop>s2</tabstop> + <tabstop>s3</tabstop> + <tabstop>s4</tabstop> + <tabstop>taux</tabstop> + <tabstop>tauy</tabstop> <tabstop>quadAspectRatio</tabstop> + <tabstop>fixCenter</tabstop> <tabstop>tangDist</tabstop> - <tabstop>markerIgnoreWithout</tabstop> - <tabstop>roiShow</tabstop> - <tabstop>roiFix</tabstop> - <tabstop>recoShowColor</tabstop> - <tabstop>recoOptimizeColor</tabstop> - <tabstop>recoColorModel</tabstop> - <tabstop>recoAutoWB</tabstop> - <tabstop>recoColorX</tabstop> + <tabstop>newModelCheckBox</tabstop> + <tabstop>boardSizeX</tabstop> + <tabstop>boardSizeY</tabstop> + <tabstop>squareSize</tabstop> + <tabstop>autoCalib</tabstop> + <tabstop>calibFiles</tabstop> <tabstop>recoColorY</tabstop> <tabstop>mapNr</tabstop> <tabstop>mapColor</tabstop> @@ -7879,6 +7946,93 @@ <tabstop>anaConsiderY</tabstop> <tabstop>anaConsiderAbs</tabstop> <tabstop>anaConsiderRev</tabstop> + <tabstop>tabs</tabstop> + <tabstop>scrollArea</tabstop> + <tabstop>coordUseIntrinsic</tabstop> + <tabstop>coordRotate_spin</tabstop> + <tabstop>gridScale_spin</tabstop> + <tabstop>gridTransX_spin</tabstop> + <tabstop>coordTransX_spin</tabstop> + <tabstop>recoColorX</tabstop> + <tabstop>coordScale_spin</tabstop> + <tabstop>recoAutoWB</tabstop> + <tabstop>gridRot_spin</tabstop> + <tabstop>coordTransY_spin</tabstop> + <tabstop>gridTransY_spin</tabstop> + <tabstop>coordAltitude</tabstop> + <tabstop>coordUnit</tabstop> + <tabstop>markerIgnoreWithout</tabstop> + <tabstop>roiShow</tabstop> + <tabstop>roiFix</tabstop> + <tabstop>recoColorModel</tabstop> + <tabstop>recoShowColor</tabstop> + <tabstop>recoOptimizeColor</tabstop> + <tabstop>trans1</tabstop> + <tabstop>rot1</tabstop> + <tabstop>trans2</tabstop> + <tabstop>trans3</tabstop> + <tabstop>rot3</tabstop> + <tabstop>rot2</tabstop> + <tabstop>coordLoad3DCalibPoints</tabstop> + <tabstop>extrCalibFetch</tabstop> + <tabstop>extrCalibSave</tabstop> + <tabstop>extrCalibShowPoints</tabstop> + <tabstop>extrCalibShowError</tabstop> + <tabstop>coordShow</tabstop> + <tabstop>coordFix</tabstop> + <tabstop>coordTab</tabstop> + <tabstop>coord3DTransX_spin</tabstop> + <tabstop>coord3DTransZ_spin</tabstop> + <tabstop>coord3DTransY_spin</tabstop> + <tabstop>coord3DAxeLen_spin</tabstop> + <tabstop>coord3DSwapX</tabstop> + <tabstop>coord3DSwapY</tabstop> + <tabstop>coord3DSwapZ</tabstop> + <tabstop>extCalibPointsShow</tabstop> + <tabstop>extVanishPointsShow</tabstop> + <tabstop>gridShow</tabstop> + <tabstop>gridFix</tabstop> + <tabstop>gridTab</tabstop> + <tabstop>grid3DTransX_spin</tabstop> + <tabstop>grid3DTransY_spin</tabstop> + <tabstop>grid3DTransZ_spin</tabstop> + <tabstop>grid3DResolution_spin</tabstop> + <tabstop>scrollArea_2</tabstop> + <tabstop>recoRoiToFullImageSize</tabstop> + <tabstop>recoRoiAdjustAutomatically</tabstop> + <tabstop>mapColorRange</tabstop> + <tabstop>colorPickerButton</tabstop> + <tabstop>mapReadHeights</tabstop> + <tabstop>mapReadMarkerID</tabstop> + <tabstop>scrollArea_3</tabstop> + <tabstop>trackRoiShow</tabstop> + <tabstop>trackRoiFix</tabstop> + <tabstop>trackRoiToFullImageSize</tabstop> + <tabstop>trackRoiAdjustAutomatically</tabstop> + <tabstop>exportViewDir</tabstop> + <tabstop>exportAngleOfView</tabstop> + <tabstop>exportUseM</tabstop> + <tabstop>exportComment</tabstop> + <tabstop>exportMarkerID</tabstop> + <tabstop>trackShowSearchSize</tabstop> + <tabstop>adaptiveLevel</tabstop> + <tabstop>trackShowOnlyNr</tabstop> + <tabstop>trackGotoStartNr</tabstop> + <tabstop>trackGotoEndNr</tabstop> + <tabstop>trackShowOnlyList</tabstop> + <tabstop>trackShowOnlyNrList</tabstop> + <tabstop>trackShowOnlyListButton</tabstop> + <tabstop>trackPathColorButton</tabstop> + <tabstop>trackShowGroundPosition</tabstop> + <tabstop>trackGroundPositionSize</tabstop> + <tabstop>trackShowGroundPath</tabstop> + <tabstop>trackGroundPathSize</tabstop> + <tabstop>trackGroundPathColorButton</tabstop> + <tabstop>showMoCap</tabstop> + <tabstop>moCapSize</tabstop> + <tabstop>moCapColorButton</tabstop> + <tabstop>scrollArea_4</tabstop> + <tabstop>showVoronoiCells</tabstop> </tabstops> <resources/> <connections>