diff options
| author | Michael Welter <michael@welter-4d.de> | 2022-05-18 06:36:25 +0200 | 
|---|---|---|
| committer | Michael Welter <michael@welter-4d.de> | 2022-05-19 20:47:11 +0200 | 
| commit | e1d17f2d413de5f548931eaf9dfed2155e830096 (patch) | |
| tree | 5d84d4aefc023b560485ff2a1d96d11e9c2d418b /tracker-neuralnet/neuralnet-trackercontrols.ui | |
| parent | f788d94a9ea446c7b687b4a8f3d4cfae41a61296 (diff) | |
tracker/nn: Improve preview
* The preview image is now generated with the dimensions of the widget
* The pose visualization is added afterwards adjusted to the preview size
* The fps / inference time readout is moved to the settings dialog
* The actual obtained resolution from the camera is also shown
* Dialog layout is changed
Note: Switching to using underscore to mark class member vars.
      It's not consistently applied yet.
Diffstat (limited to 'tracker-neuralnet/neuralnet-trackercontrols.ui')
| -rw-r--r-- | tracker-neuralnet/neuralnet-trackercontrols.ui | 787 | 
1 files changed, 431 insertions, 356 deletions
diff --git a/tracker-neuralnet/neuralnet-trackercontrols.ui b/tracker-neuralnet/neuralnet-trackercontrols.ui index 43b316e9..750e6ef3 100644 --- a/tracker-neuralnet/neuralnet-trackercontrols.ui +++ b/tracker-neuralnet/neuralnet-trackercontrols.ui @@ -9,387 +9,223 @@     <rect>      <x>0</x>      <y>0</y> -    <width>647</width> -    <height>305</height> +    <width>671</width> +    <height>357</height>     </rect>    </property>    <property name="windowTitle">     <string>Tracker settings</string>    </property>    <layout class="QGridLayout" name="gridLayout"> -   <item row="9" column="0"> -    <widget class="QDialogButtonBox" name="buttonBox"> -     <property name="standardButtons"> -      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> +   <item row="2" column="0"> +    <widget class="QGroupBox" name="groupBox"> +     <property name="sizePolicy"> +      <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> +       <horstretch>0</horstretch> +       <verstretch>0</verstretch> +      </sizepolicy>       </property> -    </widget> -   </item> -   <item row="3" column="0"> -    <widget class="QFrame" name="frame_3"> -     <property name="frameShape"> -      <enum>QFrame::StyledPanel</enum> +     <property name="autoFillBackground"> +      <bool>true</bool>       </property> -     <property name="frameShadow"> -      <enum>QFrame::Raised</enum> +     <property name="title"> +      <string>Camera Configuration</string> +     </property> +     <property name="flat"> +      <bool>false</bool> +     </property> +     <property name="checkable"> +      <bool>false</bool>       </property>       <layout class="QHBoxLayout" name="horizontalLayout">        <property name="spacing"> -       <number>0</number> -      </property> -      <property name="leftMargin"> -       <number>0</number> -      </property> -      <property name="topMargin"> -       <number>0</number> -      </property> -      <property name="rightMargin"> -       <number>0</number> +       <number>10</number>        </property>        <property name="bottomMargin"> -       <number>0</number> +       <number>8</number>        </property>        <item> -       <widget class="QGroupBox" name="groupBox"> -        <property name="sizePolicy"> -         <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> -          <horstretch>0</horstretch> -          <verstretch>0</verstretch> -         </sizepolicy> +       <layout class="QGridLayout" name="gridLayout_3"> +        <property name="sizeConstraint"> +         <enum>QLayout::SetDefaultConstraint</enum>          </property> -        <property name="title"> -         <string>Camera Configuration</string> +        <property name="leftMargin"> +         <number>0</number>          </property> -        <layout class="QGridLayout" name="gridLayout_4"> -         <item row="4" column="0"> -          <widget class="QLabel" name="resolution_label"> -           <property name="text"> -            <string>Resolution</string> -           </property> -          </widget> -         </item> -         <item row="0" column="1"> -          <widget class="QSpinBox" name="cameraFOV"> -           <property name="sizePolicy"> -            <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> -             <horstretch>0</horstretch> -             <verstretch>0</verstretch> -            </sizepolicy> -           </property> -           <property name="toolTip"> -            <string>Field of view. Needed to transform the pose to world coordinates.</string> -           </property> -           <property name="locale"> -            <locale language="English" country="UnitedStates"/> -           </property> -           <property name="minimum"> -            <number>35</number> -           </property> -           <property name="maximum"> -            <number>90</number> -           </property> -          </widget> -         </item> -         <item row="1" column="0"> -          <widget class="QLabel" name="label_12"> -           <property name="text"> -            <string>Frames per second</string> -           </property> -          </widget> -         </item> -         <item row="0" column="0"> -          <widget class="QLabel" name="label_9"> -           <property name="text"> -            <string>Diagonal FOV</string> -           </property> -          </widget> -         </item> -         <item row="1" column="1"> -          <widget class="QComboBox" name="cameraFPS"> -           <property name="sizePolicy"> -            <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> -             <horstretch>0</horstretch> -             <verstretch>0</verstretch> -            </sizepolicy> -           </property> -           <property name="toolTip"> -            <string>Requested video frame rate. Actual setting may not be supported by the camera.</string> -           </property> -          </widget> -         </item> -         <item row="7" column="1"> -          <widget class="QPushButton" name="camera_settings"> -           <property name="sizePolicy"> -            <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> -             <horstretch>0</horstretch> -             <verstretch>0</verstretch> -            </sizepolicy> -           </property> -           <property name="text"> -            <string>Camera settings</string> -           </property> -          </widget> -         </item> -         <item row="4" column="1"> -          <widget class="QComboBox" name="resolution"> -           <property name="toolTip"> -            <string>The requested resolution for cases where the camera delivers maximum frame rate only for a particular resolution. The image may still be downscaled to the internal resolution.</string> -           </property> -          </widget> -         </item> -         <item row="6" column="1"> -          <widget class="QComboBox" name="cameraName"> -           <property name="sizePolicy"> -            <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> -             <horstretch>0</horstretch> -             <verstretch>0</verstretch> -            </sizepolicy> -           </property> -          </widget> -         </item> -         <item row="6" column="0"> -          <widget class="QLabel" name="label_10"> -           <property name="text"> -            <string>Camera name</string> -           </property> -          </widget> -         </item> -         <item row="5" column="1"> -          <widget class="QCheckBox" name="use_mjpeg"> -           <property name="sizePolicy"> -            <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> -             <horstretch>0</horstretch> -             <verstretch>0</verstretch> -            </sizepolicy> -           </property> -           <property name="text"> -            <string/> -           </property> -          </widget> -         </item> -         <item row="5" column="0"> -          <widget class="QLabel" name="label_11"> -           <property name="text"> -            <string>MJPEG</string> -           </property> -          </widget> -         </item> -        </layout> -       </widget> +        <property name="topMargin"> +         <number>0</number> +        </property> +        <property name="rightMargin"> +         <number>0</number> +        </property> +        <property name="bottomMargin"> +         <number>0</number> +        </property> +        <property name="horizontalSpacing"> +         <number>0</number> +        </property> +        <property name="verticalSpacing"> +         <number>2</number> +        </property> +        <item row="0" column="1"> +         <widget class="QComboBox" name="cameraName"> +          <property name="sizePolicy"> +           <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> +            <horstretch>0</horstretch> +            <verstretch>0</verstretch> +           </sizepolicy> +          </property> +         </widget> +        </item> +        <item row="1" column="0"> +         <widget class="QLabel" name="label_9"> +          <property name="text"> +           <string>Diagonal FOV</string> +          </property> +         </widget> +        </item> +        <item row="0" column="0"> +         <widget class="QLabel" name="label_10"> +          <property name="text"> +           <string>Camera name</string> +          </property> +         </widget> +        </item> +        <item row="1" column="1"> +         <widget class="QSpinBox" name="cameraFOV"> +          <property name="sizePolicy"> +           <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> +            <horstretch>0</horstretch> +            <verstretch>0</verstretch> +           </sizepolicy> +          </property> +          <property name="toolTip"> +           <string>Field of view. Needed to transform the pose to world coordinates.</string> +          </property> +          <property name="locale"> +           <locale language="English" country="UnitedStates"/> +          </property> +          <property name="minimum"> +           <number>35</number> +          </property> +          <property name="maximum"> +           <number>90</number> +          </property> +         </widget> +        </item> +        <item row="2" column="1"> +         <widget class="QComboBox" name="resolution"> +          <property name="sizePolicy"> +           <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> +            <horstretch>0</horstretch> +            <verstretch>0</verstretch> +           </sizepolicy> +          </property> +          <property name="toolTip"> +           <string>The requested resolution for cases where the camera delivers maximum frame rate only for a particular resolution. The image may still be downscaled to the internal resolution.</string> +          </property> +         </widget> +        </item> +        <item row="2" column="0"> +         <widget class="QLabel" name="resolution_label"> +          <property name="text"> +           <string>Resolution</string> +          </property> +         </widget> +        </item> +       </layout>        </item>        <item> -       <widget class="QGroupBox" name="groupBox_10"> -        <property name="sizePolicy"> -         <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> -          <horstretch>0</horstretch> -          <verstretch>0</verstretch> -         </sizepolicy> +       <layout class="QGridLayout" name="gridLayout_6"> +        <property name="leftMargin"> +         <number>0</number>          </property> -        <property name="title"> -         <string>Head Center Offset</string> +        <property name="topMargin"> +         <number>0</number>          </property> -        <layout class="QGridLayout" name="gridLayout_5"> -         <item row="0" column="0"> -          <widget class="QFrame" name="frame_4"> -           <property name="sizePolicy"> -            <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> -             <horstretch>0</horstretch> -             <verstretch>0</verstretch> -            </sizepolicy> -           </property> -           <property name="maximumSize"> -            <size> -             <width>16777215</width> -             <height>16777215</height> -            </size> -           </property> -           <property name="frameShape"> -            <enum>QFrame::NoFrame</enum> -           </property> -           <property name="frameShadow"> -            <enum>QFrame::Raised</enum> -           </property> -           <layout class="QGridLayout" name="gridLayout_11"> -            <property name="sizeConstraint"> -             <enum>QLayout::SetDefaultConstraint</enum> -            </property> -            <property name="verticalSpacing"> -             <number>0</number> -            </property> -            <item row="1" column="1"> -             <widget class="QSpinBox" name="ty_spin"> -              <property name="maximumSize"> -               <size> -                <width>150</width> -                <height>16777215</height> -               </size> -              </property> -              <property name="suffix"> -               <string> mm</string> -              </property> -              <property name="minimum"> -               <number>-65535</number> -              </property> -              <property name="maximum"> -               <number>65536</number> -              </property> -             </widget> -            </item> -            <item row="2" column="0"> -             <widget class="QLabel" name="label_66"> -              <property name="sizePolicy"> -               <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> -                <horstretch>0</horstretch> -                <verstretch>0</verstretch> -               </sizepolicy> -              </property> -              <property name="text"> -               <string>Right</string> -              </property> -             </widget> -            </item> -            <item row="2" column="1"> -             <widget class="QSpinBox" name="tz_spin"> -              <property name="maximumSize"> -               <size> -                <width>150</width> -                <height>16777215</height> -               </size> -              </property> -              <property name="suffix"> -               <string> mm</string> -              </property> -              <property name="minimum"> -               <number>-65535</number> -              </property> -              <property name="maximum"> -               <number>65536</number> -              </property> -             </widget> -            </item> -            <item row="0" column="0"> -             <widget class="QLabel" name="label_61"> -              <property name="sizePolicy"> -               <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> -                <horstretch>0</horstretch> -                <verstretch>0</verstretch> -               </sizepolicy> -              </property> -              <property name="text"> -               <string>Forward</string> -              </property> -             </widget> -            </item> -            <item row="0" column="1"> -             <widget class="QSpinBox" name="tx_spin"> -              <property name="maximumSize"> -               <size> -                <width>150</width> -                <height>16777215</height> -               </size> -              </property> -              <property name="suffix"> -               <string> mm</string> -              </property> -              <property name="minimum"> -               <number>-65535</number> -              </property> -              <property name="maximum"> -               <number>65536</number> -              </property> -             </widget> -            </item> -            <item row="1" column="0"> -             <widget class="QLabel" name="label_62"> -              <property name="sizePolicy"> -               <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> -                <horstretch>0</horstretch> -                <verstretch>0</verstretch> -               </sizepolicy> -              </property> -              <property name="text"> -               <string>Up</string> -              </property> -             </widget> -            </item> -           </layout> -          </widget> -         </item> -         <item row="0" column="1"> -          <widget class="QFrame" name="frame_5"> -           <property name="sizePolicy"> -            <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> -             <horstretch>0</horstretch> -             <verstretch>0</verstretch> -            </sizepolicy> -           </property> -           <property name="minimumSize"> -            <size> -             <width>260</width> -             <height>0</height> -            </size> -           </property> -           <property name="frameShape"> -            <enum>QFrame::NoFrame</enum> -           </property> -           <property name="frameShadow"> -            <enum>QFrame::Raised</enum> -           </property> -           <layout class="QVBoxLayout" name="verticalLayout_2"> -            <item> -             <widget class="QLabel" name="label_59"> -              <property name="text"> -               <string>Use only yaw and pitch while calibrating. -Don't roll or change position.</string> -              </property> -              <property name="alignment"> -               <set>Qt::AlignCenter</set> -              </property> -              <property name="wordWrap"> -               <bool>true</bool> -              </property> -              <property name="openExternalLinks"> -               <bool>false</bool> -              </property> -             </widget> -            </item> -            <item> -             <widget class="QLabel" name="sample_count_display"> -              <property name="sizePolicy"> -               <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> -                <horstretch>0</horstretch> -                <verstretch>0</verstretch> -               </sizepolicy> -              </property> -              <property name="text"> -               <string/> -              </property> -              <property name="wordWrap"> -               <bool>true</bool> -              </property> -             </widget> -            </item> -            <item> -             <widget class="QPushButton" name="tcalib_button"> -              <property name="enabled"> -               <bool>false</bool> -              </property> -              <property name="text"> -               <string>Start calibration</string> -              </property> -              <property name="checkable"> -               <bool>true</bool> -              </property> -             </widget> -            </item> -           </layout> -          </widget> -         </item> -        </layout> -       </widget> +        <property name="rightMargin"> +         <number>0</number> +        </property> +        <property name="bottomMargin"> +         <number>0</number> +        </property> +        <property name="horizontalSpacing"> +         <number>0</number> +        </property> +        <property name="verticalSpacing"> +         <number>2</number> +        </property> +        <item row="4" column="1"> +         <widget class="QComboBox" name="cameraFPS"> +          <property name="sizePolicy"> +           <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> +            <horstretch>0</horstretch> +            <verstretch>0</verstretch> +           </sizepolicy> +          </property> +          <property name="toolTip"> +           <string>Requested video frame rate. Actual setting may not be supported by the camera.</string> +          </property> +         </widget> +        </item> +        <item row="4" column="0"> +         <widget class="QLabel" name="label_12"> +          <property name="text"> +           <string>Frames per second</string> +          </property> +         </widget> +        </item> +        <item row="2" column="1"> +         <widget class="QCheckBox" name="use_mjpeg"> +          <property name="sizePolicy"> +           <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> +            <horstretch>0</horstretch> +            <verstretch>0</verstretch> +           </sizepolicy> +          </property> +          <property name="minimumSize"> +           <size> +            <width>0</width> +            <height>0</height> +           </size> +          </property> +          <property name="text"> +           <string/> +          </property> +         </widget> +        </item> +        <item row="2" column="0"> +         <widget class="QLabel" name="label_11"> +          <property name="text"> +           <string>MJPEG</string> +          </property> +         </widget> +        </item> +        <item row="0" column="1"> +         <widget class="QPushButton" name="camera_settings"> +          <property name="sizePolicy"> +           <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> +            <horstretch>0</horstretch> +            <verstretch>0</verstretch> +           </sizepolicy> +          </property> +          <property name="text"> +           <string>Camera settings</string> +          </property> +         </widget> +        </item> +       </layout>        </item>       </layout>      </widget>     </item> +   <item row="9" column="0"> +    <widget class="QDialogButtonBox" name="buttonBox"> +     <property name="standardButtons"> +      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> +     </property> +    </widget> +   </item>     <item row="5" column="0">      <widget class="QGroupBox" name="tuningOptionsBox">       <property name="sizePolicy"> @@ -404,6 +240,9 @@ Don't roll or change position.</string>         <height>0</height>        </size>       </property> +     <property name="autoFillBackground"> +      <bool>true</bool> +     </property>       <property name="title">        <string>Tuning / Debug</string>       </property> @@ -554,6 +393,242 @@ Don't roll or change position.</string>       </layout>      </widget>     </item> +   <item row="4" column="0"> +    <widget class="QGroupBox" name="groupBox_10"> +     <property name="sizePolicy"> +      <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> +       <horstretch>0</horstretch> +       <verstretch>0</verstretch> +      </sizepolicy> +     </property> +     <property name="autoFillBackground"> +      <bool>true</bool> +     </property> +     <property name="title"> +      <string>Head Center Offset</string> +     </property> +     <layout class="QGridLayout" name="gridLayout_5"> +      <item row="0" column="0"> +       <widget class="QFrame" name="frame_4"> +        <property name="sizePolicy"> +         <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> +          <horstretch>0</horstretch> +          <verstretch>0</verstretch> +         </sizepolicy> +        </property> +        <property name="maximumSize"> +         <size> +          <width>16777215</width> +          <height>16777215</height> +         </size> +        </property> +        <property name="frameShape"> +         <enum>QFrame::NoFrame</enum> +        </property> +        <property name="frameShadow"> +         <enum>QFrame::Raised</enum> +        </property> +        <layout class="QGridLayout" name="gridLayout_11"> +         <property name="sizeConstraint"> +          <enum>QLayout::SetDefaultConstraint</enum> +         </property> +         <property name="verticalSpacing"> +          <number>0</number> +         </property> +         <item row="1" column="1"> +          <widget class="QSpinBox" name="ty_spin"> +           <property name="maximumSize"> +            <size> +             <width>150</width> +             <height>16777215</height> +            </size> +           </property> +           <property name="suffix"> +            <string> mm</string> +           </property> +           <property name="minimum"> +            <number>-65535</number> +           </property> +           <property name="maximum"> +            <number>65536</number> +           </property> +          </widget> +         </item> +         <item row="2" column="0"> +          <widget class="QLabel" name="label_66"> +           <property name="sizePolicy"> +            <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> +             <horstretch>0</horstretch> +             <verstretch>0</verstretch> +            </sizepolicy> +           </property> +           <property name="text"> +            <string>Right</string> +           </property> +          </widget> +         </item> +         <item row="2" column="1"> +          <widget class="QSpinBox" name="tz_spin"> +           <property name="maximumSize"> +            <size> +             <width>150</width> +             <height>16777215</height> +            </size> +           </property> +           <property name="suffix"> +            <string> mm</string> +           </property> +           <property name="minimum"> +            <number>-65535</number> +           </property> +           <property name="maximum"> +            <number>65536</number> +           </property> +          </widget> +         </item> +         <item row="0" column="0"> +          <widget class="QLabel" name="label_61"> +           <property name="sizePolicy"> +            <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> +             <horstretch>0</horstretch> +             <verstretch>0</verstretch> +            </sizepolicy> +           </property> +           <property name="text"> +            <string>Forward</string> +           </property> +          </widget> +         </item> +         <item row="0" column="1"> +          <widget class="QSpinBox" name="tx_spin"> +           <property name="maximumSize"> +            <size> +             <width>150</width> +             <height>16777215</height> +            </size> +           </property> +           <property name="suffix"> +            <string> mm</string> +           </property> +           <property name="minimum"> +            <number>-65535</number> +           </property> +           <property name="maximum"> +            <number>65536</number> +           </property> +          </widget> +         </item> +         <item row="1" column="0"> +          <widget class="QLabel" name="label_62"> +           <property name="sizePolicy"> +            <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> +             <horstretch>0</horstretch> +             <verstretch>0</verstretch> +            </sizepolicy> +           </property> +           <property name="text"> +            <string>Up</string> +           </property> +          </widget> +         </item> +        </layout> +       </widget> +      </item> +      <item row="0" column="1"> +       <widget class="QFrame" name="frame_5"> +        <property name="sizePolicy"> +         <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> +          <horstretch>0</horstretch> +          <verstretch>0</verstretch> +         </sizepolicy> +        </property> +        <property name="minimumSize"> +         <size> +          <width>260</width> +          <height>0</height> +         </size> +        </property> +        <property name="frameShape"> +         <enum>QFrame::NoFrame</enum> +        </property> +        <property name="frameShadow"> +         <enum>QFrame::Raised</enum> +        </property> +        <layout class="QVBoxLayout" name="verticalLayout_2"> +         <item> +          <widget class="QLabel" name="label_59"> +           <property name="text"> +            <string>Use only yaw and pitch while calibrating. +Don't roll or change position.</string> +           </property> +           <property name="alignment"> +            <set>Qt::AlignCenter</set> +           </property> +           <property name="wordWrap"> +            <bool>true</bool> +           </property> +           <property name="openExternalLinks"> +            <bool>false</bool> +           </property> +          </widget> +         </item> +         <item> +          <widget class="QLabel" name="sample_count_display"> +           <property name="sizePolicy"> +            <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> +             <horstretch>0</horstretch> +             <verstretch>0</verstretch> +            </sizepolicy> +           </property> +           <property name="frameShape"> +            <enum>QFrame::Panel</enum> +           </property> +           <property name="frameShadow"> +            <enum>QFrame::Sunken</enum> +           </property> +           <property name="text"> +            <string/> +           </property> +           <property name="wordWrap"> +            <bool>true</bool> +           </property> +          </widget> +         </item> +         <item> +          <widget class="QPushButton" name="tcalib_button"> +           <property name="enabled"> +            <bool>false</bool> +           </property> +           <property name="text"> +            <string>Start calibration</string> +           </property> +           <property name="checkable"> +            <bool>true</bool> +           </property> +          </widget> +         </item> +        </layout> +       </widget> +      </item> +     </layout> +    </widget> +   </item> +   <item row="8" column="0"> +    <widget class="QLabel" name="resolution_display"> +     <property name="autoFillBackground"> +      <bool>true</bool> +     </property> +     <property name="frameShape"> +      <enum>QFrame::Panel</enum> +     </property> +     <property name="frameShadow"> +      <enum>QFrame::Sunken</enum> +     </property> +     <property name="text"> +      <string notr="true"/> +     </property> +    </widget> +   </item>    </layout>   </widget>   <resources/>  | 
