From fd18eef43f27190d09b096020d3622bae7842757 Mon Sep 17 00:00:00 2001 From: kga Date: Tue, 22 Oct 2013 11:42:25 +0000 Subject: [PATCH] Improve shape recognition features --- .../EntityGUI_FeatureDetectorDlg.cxx | 405 ++++++++++++++---- src/EntityGUI/EntityGUI_FeatureDetectorDlg.h | 11 + src/GEOMGUI/GEOM_msg_en.ts | 104 +++++ src/GEOMGUI/GEOM_msg_fr.ts | 104 +++++ 4 files changed, 541 insertions(+), 83 deletions(-) diff --git a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx index a9a5d2ce3..cbb5645fd 100644 --- a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx +++ b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx @@ -89,6 +89,25 @@ enum { PUSH_BUTTON, }; +enum { + KERNEL_SIZE, + FIND_CONTOURS_METHOD, + QUALITY_LEVEL, + MIN_DISTANCE, + TYPE_CRITERIA, + MAX_ITER, + EPSILON, + LOW_THRESHOLD, + RATIO, + L2GRADIENT, + SMOOTH_SIZE, + HBINS, + SBINS, + HIST_TYPE, + THRESHOLD_VALUE, + MAX_THRESHOLD, +}; + // // // View // // enum { // // XY, @@ -157,9 +176,151 @@ EntityGUI_FeatureDetectorDlg::EntityGUI_FeatureDetectorDlg( GeometryGUI* theGeom // myOutputGroup->hide(); //caché pour la demo + // Parameters + QGridLayout* parametersLayout = new QGridLayout(); + parametersLayout->setMargin(9); + QComboBox* kernelSize = new QComboBox(); + kernelSize->addItems( QStringList() << "3" << "5" << "7" ); + myWidgets.insert( KERNEL_SIZE, kernelSize ); + myUseROI = new QCheckBox( tr("USE_ROI") ); + myUseROI->setChecked( true ); + + parametersLayout->addWidget( new QLabel( tr("KERNEL_SIZE") ), 0, 0 ); + parametersLayout->addWidget( kernelSize, 0, 1 ); + parametersLayout->addWidget( myUseROI, 0, 2 ); + + // Corners Parameters + myCornersParameters = new QFrame(); + myCornersParameters->setFrameStyle(QFrame::NoFrame); + QDoubleSpinBox* qualityLevel = new QDoubleSpinBox(); + qualityLevel->setValue( 0.2 ); + qualityLevel->setSingleStep( 0.1 ); + qualityLevel->setRange( 0.01, 0.99 ); + myWidgets.insert( QUALITY_LEVEL, qualityLevel ); + QDoubleSpinBox* minDistance = new QDoubleSpinBox(); + minDistance->setValue( 1 ); + myWidgets.insert( MIN_DISTANCE, minDistance ); + QComboBox* typeCriteria = new QComboBox(); + typeCriteria->addItems( QStringList() << tr("CV_TERMCRIT_ITER") << tr("CV_TERMCRIT_EPS") << tr("CV_TERMCRIT_ITER | CV_TERMCRIT_EPS") ); + typeCriteria->setCurrentIndex( 2 ); + myWidgets.insert( TYPE_CRITERIA, typeCriteria ); + QSpinBox* maxIter = new QSpinBox(); + maxIter->setValue( 20 ); + maxIter->setRange( 1, 100 ); + myWidgets.insert( MAX_ITER, maxIter ); + QDoubleSpinBox* epsilon = new QDoubleSpinBox(); + epsilon->setValue( 0.03 ); + epsilon->setSingleStep( 0.01 ); + myWidgets.insert( EPSILON, epsilon ); + + QGridLayout* cornersLayout = new QGridLayout(); + cornersLayout->setMargin( 0 ); + cornersLayout->addWidget( new QLabel( tr("QUALITY_LEVEL") ), 0, 0 ); + cornersLayout->addWidget( qualityLevel, 0, 1 ); + cornersLayout->addWidget( new QLabel( tr("MIN_DISTANCE") ), 0, 2 ); + cornersLayout->addWidget( minDistance, 0 ,3 ); + cornersLayout->addWidget( new QLabel( tr("TYPE_CRITERIA") ), 1, 0 ); + cornersLayout->addWidget( typeCriteria, 1, 1, 1, 3 ); + cornersLayout->addWidget( new QLabel( tr("MAX_ITER") ), 2, 0 ); + cornersLayout->addWidget( maxIter, 2, 1 ); + cornersLayout->addWidget( new QLabel( tr("EPSILON") ), 2, 2 ); + cornersLayout->addWidget( epsilon, 2 , 3 ); + + myCornersParameters->setLayout( cornersLayout ); + + // Contours Parameters + myContoursParameters = new QFrame(); + myContoursParameters->setFrameStyle(QFrame::NoFrame); + + QComboBox* findContoursMethod = new QComboBox(); + findContoursMethod->addItems( QStringList() << tr("CV_CHAIN_APPROX_NONE") << tr("CV_CHAIN_APPROX_SIMPLE") << tr("CV_CHAIN_APPROX_TC89_L1") << tr("CV_CHAIN_APPROX_TC89_KCOS") ); + myWidgets.insert( FIND_CONTOURS_METHOD, findContoursMethod ); + + myCannyParameters = new QFrame(); + myCannyParameters->setFrameStyle(QFrame::NoFrame); + QSpinBox* threshold = new QSpinBox(); + threshold->setRange( 0, 255 ); + threshold->setValue( 100 ); + myWidgets.insert( LOW_THRESHOLD, threshold ); + QSpinBox* ratio = new QSpinBox(); + ratio->setValue( 3 ); + ratio->setRange( 0, 255 ); + myWidgets.insert( RATIO, ratio ); + QCheckBox* L2gradient = new QCheckBox(tr("L2GRADIENT")); + L2gradient->setChecked(true); + myWidgets.insert( L2GRADIENT, L2gradient ); + + QGridLayout* cannyLayout = new QGridLayout(); + cannyLayout->setMargin( 0 ); + cannyLayout->addWidget( new QLabel( tr("LOWTHRESHOLD") ), 0, 0 ); + cannyLayout->addWidget( threshold, 0, 1 ); + cannyLayout->addWidget( new QLabel( tr("RATIO") ), 0, 2 ); + cannyLayout->addWidget( ratio, 0, 3 ); + cannyLayout->addWidget( L2gradient, 1, 0 ); + + myCannyParameters->setLayout( cannyLayout ); + myCannyParameters->setHidden( true ); + + myColorFilterParameters = new QFrame(); + myColorFilterParameters->setFrameStyle(QFrame::NoFrame); + + QSpinBox* smoothSize = new QSpinBox(); + smoothSize->setValue( 3 ); + smoothSize->setSingleStep( 2 ); + smoothSize->setRange( 1, 1000 ); + myWidgets.insert( SMOOTH_SIZE, smoothSize ); + QSpinBox* hbins = new QSpinBox(); + hbins->setValue( 30 ); + hbins->setRange( 0, 179 ); + myWidgets.insert( HBINS, hbins ); + QSpinBox* sbins = new QSpinBox(); + sbins->setValue( 32 ); + sbins->setRange( 0, 255 ); + myWidgets.insert( SBINS, sbins ); + QComboBox* histType = new QComboBox(); + histType->addItems( QStringList() << tr("CV_HIST_ARRAY") << tr("CV_HIST_SPARSE") ); + myWidgets.insert( HIST_TYPE, histType ); + QDoubleSpinBox* thresholdValue = new QDoubleSpinBox(); + thresholdValue->setRange( 0, 254 ); + thresholdValue->setValue( 128 ); + myWidgets.insert( THRESHOLD_VALUE, thresholdValue ); + QDoubleSpinBox* maxThreshold = new QDoubleSpinBox(); + maxThreshold->setRange( 1, 255 ); + maxThreshold->setValue( 255 ); + myWidgets.insert( MAX_THRESHOLD, maxThreshold ); + + QGridLayout* colorFilterLayout = new QGridLayout(); + colorFilterLayout->setMargin( 0 ); + colorFilterLayout->addWidget( new QLabel( tr("SMOOTH_SIZE") ), 0, 0 ); + colorFilterLayout->addWidget( smoothSize, 0, 1 ); + colorFilterLayout->addWidget( new QLabel( tr("HBINS") ), 1, 0 ); + colorFilterLayout->addWidget( hbins, 1, 1 ); + colorFilterLayout->addWidget( new QLabel( tr("SBINS") ), 1, 2 ); + colorFilterLayout->addWidget( sbins, 1, 3 ); + colorFilterLayout->addWidget( new QLabel( tr("HIST_TYPE") ), 2, 0 ); + colorFilterLayout->addWidget( histType, 2, 1, 1, 3 ); + colorFilterLayout->addWidget( new QLabel( tr("THRESHOLD_VALUE") ), 3, 0 ); + colorFilterLayout->addWidget( thresholdValue, 3, 1 ); + colorFilterLayout->addWidget( new QLabel( tr("MAX_THRESHOLD") ), 3, 2 ); + colorFilterLayout->addWidget( maxThreshold, 3, 3 ); + + myColorFilterParameters->setLayout( colorFilterLayout ); + QGridLayout* contoursLayout = new QGridLayout(); + contoursLayout->setMargin( 0 ); + contoursLayout->addWidget( new QLabel( tr("FIND_CONTOURS_METHOD") ), 0, 0 ); + contoursLayout->addWidget( findContoursMethod, 0, 1 ); + contoursLayout->addWidget( myCannyParameters, 1, 0, 1, 3 ); + contoursLayout->addWidget( myColorFilterParameters, 1, 0, 1, 3 ); + + myContoursParameters->setLayout( contoursLayout ); + + parametersLayout->addWidget( myCornersParameters, 1, 0, 1, 3 ); + parametersLayout->addWidget( myContoursParameters, 1, 0, 1, 3 ); + QVBoxLayout* layout = new QVBoxLayout(centralWidget()); layout->setMargin(0); layout->setSpacing(6); // layout->addWidget( myViewGroup); + layout->addLayout( parametersLayout ); layout->addWidget( mySelectionGroup); layout->addWidget( myOutputGroup); @@ -192,6 +353,7 @@ void EntityGUI_FeatureDetectorDlg::Init() connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ); connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); + connect( myUseROI, SIGNAL( toggled(bool) ), this, SLOT( onCheckBoxClicked(bool) ) ); connect( this, SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int))); connect( mySelectionGroup->PushButton2, SIGNAL( clicked() ), this, SLOT( onButtonClicked() ) ); connect( mySelectionGroup->PushButton1, SIGNAL( clicked() ), this, SLOT( onButtonClicked() ) ); @@ -341,23 +503,21 @@ void EntityGUI_FeatureDetectorDlg::ConstructorsClicked(int id) switch (id) { case CORNERS: + myCornersParameters->show(); + myContoursParameters->hide(); // myViewGroup->show(); // mySelectionGroup->show(); myOutputGroup->hide(); // mySelectionGroup->TextLabel2->setText(tr("GEOM_DETECT_ZONE")); - mySelectionGroup->TextLabel2->hide(); - mySelectionGroup->Frame->hide(); - mySelectionGroup->PushButton2->hide(); initName(tr("GEOM_CORNERS")); break; case CONTOURS: + myCornersParameters->hide(); + myContoursParameters->show(); // myViewGroup->hide(); // mySelectionGroup->hide(); // mySelectionGroup->show(); myOutputGroup->show(); - mySelectionGroup->TextLabel2->show(); - mySelectionGroup->Frame->show(); - mySelectionGroup->PushButton2->show(); mySelectionGroup->TextLabel2->setText(tr("GEOM_COLOR_FILTER")); initName(tr("GEOM_CONTOURS")); break; @@ -424,6 +584,78 @@ void EntityGUI_FeatureDetectorDlg::onButtonClicked() } } +//================================================================================= +// function : onCheckBoxClicked(bool) +// purpose : +//================================================================================= +void EntityGUI_FeatureDetectorDlg::onCheckBoxClicked( bool isChecked ) +{ + mySelectionGroup->TextLabel2->setVisible( isChecked ); + mySelectionGroup->Frame->setVisible( isChecked ); + mySelectionGroup->PushButton2->setVisible( isChecked ); + myCannyParameters->setHidden( isChecked ); + myColorFilterParameters->setHidden( !isChecked ); +} + +//================================================================================= +// function : parametersChanged() +// purpose : +//================================================================================= +ShapeRec_Parameters* EntityGUI_FeatureDetectorDlg::parametersChanged() +{ + ShapeRec_Parameters* aParameters = new ShapeRec_Parameters(); + + if ( myConstructorId == CORNERS ) { + ShapeRec_CornersParameters* aCornersParameters = dynamic_cast( aParameters ); + if ( !aCornersParameters ) aCornersParameters = new ShapeRec_CornersParameters(); + aCornersParameters->qualityLevel = (dynamic_cast(myWidgets[QUALITY_LEVEL]))->value(); + aCornersParameters->minDistance = (dynamic_cast(myWidgets[MIN_DISTANCE]))->value(); + switch ( (dynamic_cast(myWidgets[TYPE_CRITERIA]))->currentIndex() ) { + case 0: aCornersParameters->typeCriteria = CV_TERMCRIT_ITER; + case 1: aCornersParameters->typeCriteria = CV_TERMCRIT_EPS; + case 2: aCornersParameters->typeCriteria = CV_TERMCRIT_ITER | CV_TERMCRIT_EPS; + } + aCornersParameters->maxIter = (dynamic_cast(myWidgets[MAX_ITER]))->value(); + aCornersParameters->epsilon = (dynamic_cast(myWidgets[EPSILON]))->value(); + aParameters = aCornersParameters; + } + else if ( myConstructorId == CONTOURS ) { + if ( !myUseROI->isChecked() ) { + ShapeRec_CannyParameters* aCannyParameters = dynamic_cast( aParameters ); + if ( !aCannyParameters ) aCannyParameters = new ShapeRec_CannyParameters(); + aCannyParameters->lowThreshold = (dynamic_cast(myWidgets[LOW_THRESHOLD]))->value(); + aCannyParameters->ratio = (dynamic_cast(myWidgets[RATIO]))->value(); + aCannyParameters->L2gradient = (dynamic_cast(myWidgets[L2GRADIENT]))->isChecked(); + aParameters = aCannyParameters; + } + else { + ShapeRec_ColorFilterParameters* aColorFilterParameters = dynamic_cast( aParameters ); + if ( !aColorFilterParameters ) aColorFilterParameters = new ShapeRec_ColorFilterParameters(); + int aSmoothSize = (dynamic_cast(myWidgets[SMOOTH_SIZE]))->value(); + aColorFilterParameters->smoothSize = aSmoothSize % 2 == 0 ? aSmoothSize - 1 : aSmoothSize; + aColorFilterParameters->histSize[0] = (dynamic_cast(myWidgets[HBINS]))->value(); + aColorFilterParameters->histSize[1] = (dynamic_cast(myWidgets[SBINS]))->value(); + switch ( (dynamic_cast(myWidgets[HIST_TYPE]))->currentIndex() ) { + case 0: aColorFilterParameters->histType = CV_HIST_ARRAY; break; + case 1: aColorFilterParameters->histType = CV_HIST_SPARSE; break; + } + aColorFilterParameters->threshold = (dynamic_cast(myWidgets[THRESHOLD_VALUE]))->value(); + aColorFilterParameters->maxThreshold = (dynamic_cast(myWidgets[MAX_THRESHOLD]))->value(); + aParameters = aColorFilterParameters; + } + } + + aParameters->kernelSize = ( (dynamic_cast(myWidgets[KERNEL_SIZE]))->currentText() ).toInt(); + switch ( (dynamic_cast(myWidgets[FIND_CONTOURS_METHOD]))->currentIndex() ) { + case 0: aParameters->findContoursMethod = CV_CHAIN_APPROX_NONE; break; + case 1: aParameters->findContoursMethod = CV_CHAIN_APPROX_SIMPLE; break; + case 2: aParameters->findContoursMethod = CV_CHAIN_APPROX_TC89_L1; break; + case 3: aParameters->findContoursMethod = CV_CHAIN_APPROX_TC89_KCOS; break; + } + + return aParameters; +} + //================================================================================= // function : setStartPnt( const QPoint& ) // purpose : @@ -501,85 +733,87 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects ) GEOM::GEOM_IBasicOperations_var aBasicOperations = myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() ); GEOM::GEOM_IShapesOperations_var aShapesOperations = GEOM::GEOM_IShapesOperations::_narrow( getOperation() ); - - if (myConstructorId == CORNERS) - { - double subPictureLeft; - double subPictureTop; - if( !myRect.isEmpty() ) - { - aDetector->SetROI( myRect ); - subPictureLeft = myStartPnt.X(); - subPictureTop = myStartPnt.Y(); - } - else + + ShapeRec_Parameters* parameters = parametersChanged(); + if ( !parameters ) parameters = new ShapeRec_Parameters(); + + bool useROI = myUseROI->isChecked() && !myRect.isEmpty(); + try { + if (myConstructorId == CORNERS) { - subPictureLeft = pictureLeft; - subPictureTop = pictureTop; - } - aDetector->ComputeCorners(); - CvPoint2D32f* corners = aDetector->GetCorners(); - int cornerCount = aDetector->GetCornerCount(); - int i; + double subPictureLeft; + double subPictureTop; + if( useROI ) + { + subPictureLeft = myStartPnt.X(); + subPictureTop = myStartPnt.Y(); + } + else + { + subPictureLeft = pictureLeft; + subPictureTop = pictureTop; + } + aDetector->ComputeCorners( useROI, parameters ); + CvPoint2D32f* corners = aDetector->GetCorners(); + int cornerCount = aDetector->GetCornerCount(); + int i; - // Build the geom objects associated to the detected corners and returned by execute - if( !aBasicOperations->_is_nil() && !aShapesOperations->_is_nil() ) - { - GEOM::GEOM_Object_var aGeomCorner; - GEOM::ListOfGO_var geomCorners = new GEOM::ListOfGO(); - geomCorners->length( cornerCount ); - for (i = 0; i < cornerCount; i++) + // Build the geom objects associated to the detected corners and returned by execute + if( !aBasicOperations->_is_nil() && !aShapesOperations->_is_nil() ) { - double x = subPictureLeft + corners[i].x; - double y = subPictureTop - corners[i].y; - double z = 0; + GEOM::GEOM_Object_var aGeomCorner; + GEOM::ListOfGO_var geomCorners = new GEOM::ListOfGO(); + geomCorners->length( cornerCount ); + for (i = 0; i < cornerCount; i++) + { + double x = subPictureLeft + corners[i].x; + double y = subPictureTop - corners[i].y; + double z = 0; - aGeomCorner = aBasicOperations->MakePointXYZ( x,y,z ); + aGeomCorner = aBasicOperations->MakePointXYZ( x,y,z ); - geomCorners[i] = aGeomCorner; - } - GEOM::GEOM_Object_var aCompound = aShapesOperations->MakeCompound(geomCorners); - if ( !aCompound->_is_nil() ) - { - // Dark blue color - SALOMEDS::Color aColor; - aColor.R = 0; - aColor.G = 0; - aColor.B = 0.8; - - aCompound->SetColor(aColor); - aCompound->SetMarkerStd(GEOM::MT_POINT,GEOM::MS_30); - objects.push_back( aCompound._retn() ); - res = true; - } + geomCorners[i] = aGeomCorner; + } + GEOM::GEOM_Object_var aCompound = aShapesOperations->MakeCompound(geomCorners); + if ( !aCompound->_is_nil() ) + { + // Dark blue color + SALOMEDS::Color aColor; + aColor.R = 0; + aColor.G = 0; + aColor.B = 0.8; + + aCompound->SetColor(aColor); + aCompound->SetMarkerStd(GEOM::MT_POINT,GEOM::MS_30); + objects.push_back( aCompound._retn() ); + res = true; + } + } } - } - else if (myConstructorId == CONTOURS) - { - int method = 0 ; //CANNY - if( !myRect.isEmpty() && myRect.width() > 1 ) - { - aDetector->SetROI( myRect ); - method = 1 ; //COLORFILTER - } - - GEOM::GEOM_ICurvesOperations_var aCurveOperations = myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() ); - - aDetector->ComputeContours( method ); - std::vector< std::vector > contours = aDetector->GetContours(); - std::vector hierarchy = aDetector->GetContoursHierarchy(); - - std::vector< cv::Point > contour; - int idx = 0; + else if (myConstructorId == CONTOURS) + { + GEOM::GEOM_ICurvesOperations_var aCurveOperations = myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() ); + + aDetector->ComputeContours( useROI, parameters ); + std::vector< std::vector > contours = aDetector->GetContours(); + std::vector hierarchy = aDetector->GetContoursHierarchy(); - GEOM::ListOfGO_var geomContours = new GEOM::ListOfGO(); - int contourCount = 0; + std::vector< cv::Point > contour; + int idx = 0; + + GEOM::ListOfGO_var geomContours = new GEOM::ListOfGO(); + int contourCount = 0; - bool insert; + bool insert; - MESSAGE("hierarchy.size() =" << hierarchy.size()) - for( ; idx >= 0; idx = hierarchy[idx][0]) - { + MESSAGE("hierarchy.size() =" << hierarchy.size()) + if ( hierarchy.size() < 1 ) { + getOperation()->SetErrorCode( "Impossible detected contours" ); + return false; + } + + for( ; idx >= 0; idx = hierarchy[idx][0]) + { // for(int count=0, child=idx; child>=0, count<1; child=hierarchy[idx][2], count++) // { // contour = contours[child]; @@ -595,7 +829,7 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects ) int j = 0; std::set< std::vector > existing_points; std::pair< std::set< std::vector >::iterator,bool > pnt_it; - for ( it=contour.begin() ; it < contour.end(); it++ ) + for ( it=contour.begin() ; it < contour.end()-1; it++ ) { int pnt_array[] = {it->x,it->y}; std::vector pnt (pnt_array, pnt_array + sizeof(pnt_array) / sizeof(int) ); @@ -662,13 +896,18 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects ) contourCount++; } // } + } + GEOM::GEOM_Object_var aContoursCompound = aShapesOperations->MakeCompound(geomContours); + if ( !aContoursCompound->_is_nil() ) + { + objects.push_back( aContoursCompound._retn() ); + } + res=true; } - GEOM::GEOM_Object_var aContoursCompound = aShapesOperations->MakeCompound(geomContours); - if ( !aContoursCompound->_is_nil() ) - { - objects.push_back( aContoursCompound._retn() ); - } - res=true; + } + catch( ... ) { + getOperation()->SetErrorCode( "Impossible detected contours/corners" ); + return false; } // TEST not very conclusive diff --git a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.h b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.h index cdbced647..fdc850d8d 100644 --- a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.h +++ b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.h @@ -34,6 +34,7 @@ class QCheckBox; class QGroupBox; class QPushButton; class QLabel; +class QFrame; class QPoint; class DlgRef_3Radio; class DlgRef_1Sel; @@ -41,6 +42,7 @@ class DlgRef_1Sel1Frame; class gp_Pnt; class ShapeRec_FeatureDetector; +class ShapeRec_Parameters; //================================================================================= // class : EntityGUI_Dlg @@ -68,6 +70,7 @@ private: void Init(); bool setSelectionRect(); void showImageSample(); + ShapeRec_Parameters* parametersChanged(); private slots: @@ -75,6 +78,7 @@ private slots: void ConstructorsClicked( int ); // void onViewClicked( int ); void onButtonClicked(); + void onCheckBoxClicked( bool ); void ClickOnOk(); bool ClickOnApply(); @@ -92,6 +96,13 @@ private: DlgRef_1Sel1Frame* mySelectionGroup; DlgRef_1Sel* mySelWidget; + + QCheckBox* myUseROI; + QFrame* myCornersParameters; + QFrame* myContoursParameters; + QFrame* myCannyParameters; + QFrame* myColorFilterParameters; + QList myWidgets; // Output typeselection widget DlgRef_3Radio* myOutputGroup;; diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index c0b8d2e95..9ab089610 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -5318,6 +5318,110 @@ Number of sketch points too small GEOM_LEFT Left (X-Z) + + USE_ROI + Use region of interest + + + KERNEL_SIZE + Kernel size + + + QUALITY_LEVEL + Quality level + + + MIN_DISTANCE + Min distance + + + TYPE_CRITERIA + Type criteria + + + CV_TERMCRIT_ITER + Max number of iteration + + + CV_TERMCRIT_EPS + Epsilon + + + CV_TERMCRIT_ITER | CV_TERMCRIT_EPS + Max number of iteration or epsilon + + + MAX_ITER + Max iteration + + + EPSILON + Epsilon + + + L2GRADIENT + L2 gradient + + + LOWTHRESHOLD + Low theshold + + + RATIO + Ratio + + + SMOOTH_SIZE + Smooth size + + + HBINS + Hbins + + + SBINS + Sbins + + + HIST_TYPE + Histogram type + + + CV_HIST_ARRAY + Multi-dimensional dense array + + + CV_HIST_SPARSE + Multi-dimensional sparse array + + + THRESHOLD_VALUE + Threshold value + + + MAX_THRESHOLD + Max threshold + + + FIND_CONTOURS_METHOD + Chain approximation method + + + CV_CHAIN_APPROX_NONE + None + + + CV_CHAIN_APPROX_SIMPLE + Simple + + + CV_CHAIN_APPROX_TC89_KCOS + TC89 KCOS + + + CV_CHAIN_APPROX_TC89_L1 + TC89 L1 + EntityGUI_PictureImportDlg diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts index f013178ac..0e6ad23e1 100644 --- a/src/GEOMGUI/GEOM_msg_fr.ts +++ b/src/GEOMGUI/GEOM_msg_fr.ts @@ -5255,6 +5255,110 @@ Le nombre de points n'est pas suffisant GEOM_LEFT Gauche (X-Z) + + USE_ROI + Use region of interest + + + KERNEL_SIZE + Kernel size + + + QUALITY_LEVEL + Quality level + + + MIN_DISTANCE + Min distance + + + TYPE_CRITERIA + Type criteria + + + CV_TERMCRIT_ITER + Max number of iteration + + + CV_TERMCRIT_EPS + Epsilon + + + CV_TERMCRIT_ITER | CV_TERMCRIT_EPS + Max number of iteration or epsilon + + + MAX_ITER + Max iteration + + + EPSILON + Epsilon + + + L2GRADIENT + L2 gradient + + + LOWTHRESHOLD + Low theshold + + + RATIO + Ratio + + + SMOOTH_SIZE + Smooth size + + + HBINS + Hbins + + + SBINS + Sbins + + + HIST_TYPE + Histogram type + + + CV_HIST_ARRAY + Multi-dimensional dense array + + + CV_HIST_SPARSE + Multi-dimensional sparse array + + + THRESHOLD_VALUE + Threshold value + + + MAX_THRESHOLD + Max threshold + + + FIND_CONTOURS_METHOD + Chain approximation method + + + CV_CHAIN_APPROX_NONE + None + + + CV_CHAIN_APPROX_SIMPLE + Simple + + + CV_CHAIN_APPROX_TC89_KCOS + TC89 KCOS + + + CV_CHAIN_APPROX_TC89_L1 + TC89 L1 + EntityGUI_PictureImportDlg -- 2.39.2