Skip to content

Commit e98f42e

Browse files
committed
Merge branch 'GSOC_text_detect_DNN_backend' of https://github.com/sghoshcvc/opencv_contrib into GSOC_text_detect_DNN_backend
merge conflict
2 parents dc48968 + 731637e commit e98f42e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+743
-689
lines changed

modules/aruco/src/charuco.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
738738

739739
CV_Assert(_markerIds.total() > 0 && _markerIds.total() == _markerCorners.total());
740740

741-
const float minRepDistanceRate = 0.12f;
741+
const float minRepDistanceRate = 1.302455f;
742742

743743
// create Charuco board layout for diamond (3x3 layout)
744744
Ptr<Dictionary> dict = getPredefinedDictionary(PREDEFINED_DICTIONARY_NAME(0));
@@ -771,7 +771,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
771771
perimeterSq += edge.x*edge.x + edge.y*edge.y;
772772
}
773773
// maximum reprojection error relative to perimeter
774-
float minRepDistance = perimeterSq * minRepDistanceRate * minRepDistanceRate;
774+
float minRepDistance = sqrt(perimeterSq) * minRepDistanceRate;
775775

776776
int currentId = _markerIds.getMat().at< int >(i);
777777

modules/bgsegm/include/opencv2/bgsegm.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ CV_EXPORTS_W Ptr<BackgroundSubtractorGMG> createBackgroundSubtractorGMG(int init
189189
190190
About as fast as MOG2 on a high end system.
191191
More than twice faster than MOG2 on cheap hardware (benchmarked on Raspberry Pi3).
192+
193+
%Algorithm by Sagi Zeevi ( https://github.com/sagi-z/BackgroundSubtractorCNT )
192194
*/
193195
class CV_EXPORTS_W BackgroundSubtractorCNT : public BackgroundSubtractor
194196
{

modules/bioinspired/include/opencv2/bioinspired/retina.hpp

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -422,32 +422,30 @@ class CV_EXPORTS_W Retina : public Algorithm {
422422
Retina::getParvo methods
423423
*/
424424
CV_WRAP virtual void activateContoursProcessing(const bool activate)=0;
425-
};
426-
427-
//! @relates bioinspired::Retina
428-
//! @{
429-
430-
/** @overload */
431-
CV_EXPORTS_W Ptr<Retina> createRetina(Size inputSize);
432-
/** @brief Constructors from standardized interfaces : retreive a smart pointer to a Retina instance
433-
434-
@param inputSize the input frame size
435-
@param colorMode the chosen processing mode : with or without color processing
436-
@param colorSamplingMethod specifies which kind of color sampling will be used :
437-
- cv::bioinspired::RETINA_COLOR_RANDOM: each pixel position is either R, G or B in a random choice
438-
- cv::bioinspired::RETINA_COLOR_DIAGONAL: color sampling is RGBRGBRGB..., line 2 BRGBRGBRG..., line 3, GBRGBRGBR...
439-
- cv::bioinspired::RETINA_COLOR_BAYER: standard bayer sampling
440-
@param useRetinaLogSampling activate retina log sampling, if true, the 2 following parameters can
441-
be used
442-
@param reductionFactor only usefull if param useRetinaLogSampling=true, specifies the reduction
443-
factor of the output frame (as the center (fovea) is high resolution and corners can be
444-
underscaled, then a reduction of the output is allowed without precision leak
445-
@param samplingStrenght only usefull if param useRetinaLogSampling=true, specifies the strenght of
446-
the log scale that is applied
447-
*/
448-
CV_EXPORTS_W Ptr<Retina> createRetina(Size inputSize, const bool colorMode, int colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const float reductionFactor=1.0f, const float samplingStrenght=10.0f);
449425

450-
//! @}
426+
/** @overload */
427+
CV_WRAP static Ptr<Retina> create(Size inputSize);
428+
/** @brief Constructors from standardized interfaces : retreive a smart pointer to a Retina instance
429+
430+
@param inputSize the input frame size
431+
@param colorMode the chosen processing mode : with or without color processing
432+
@param colorSamplingMethod specifies which kind of color sampling will be used :
433+
- cv::bioinspired::RETINA_COLOR_RANDOM: each pixel position is either R, G or B in a random choice
434+
- cv::bioinspired::RETINA_COLOR_DIAGONAL: color sampling is RGBRGBRGB..., line 2 BRGBRGBRG..., line 3, GBRGBRGBR...
435+
- cv::bioinspired::RETINA_COLOR_BAYER: standard bayer sampling
436+
@param useRetinaLogSampling activate retina log sampling, if true, the 2 following parameters can
437+
be used
438+
@param reductionFactor only usefull if param useRetinaLogSampling=true, specifies the reduction
439+
factor of the output frame (as the center (fovea) is high resolution and corners can be
440+
underscaled, then a reduction of the output is allowed without precision leak
441+
@param samplingStrenght only usefull if param useRetinaLogSampling=true, specifies the strenght of
442+
the log scale that is applied
443+
*/
444+
CV_WRAP static Ptr<Retina> create(Size inputSize, const bool colorMode,
445+
int colorSamplingMethod=RETINA_COLOR_BAYER,
446+
const bool useRetinaLogSampling=false,
447+
const float reductionFactor=1.0f, const float samplingStrenght=10.0f);
448+
};
451449

452450
//! @}
453451

modules/bioinspired/include/opencv2/bioinspired/retinafasttonemapping.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ class CV_EXPORTS_W RetinaFastToneMapping : public Algorithm
126126
(default is 1, see reference paper)
127127
*/
128128
CV_WRAP virtual void setup(const float photoreceptorsNeighborhoodRadius=3.f, const float ganglioncellsNeighborhoodRadius=1.f, const float meanLuminanceModulatorK=1.f)=0;
129+
130+
CV_WRAP static Ptr<RetinaFastToneMapping> create(Size inputSize);
129131
};
130132

131-
//! @relates bioinspired::RetinaFastToneMapping
132-
CV_EXPORTS_W Ptr<RetinaFastToneMapping> createRetinaFastToneMapping(Size inputSize);
133133

134134
//! @}
135135

modules/bioinspired/include/opencv2/bioinspired/transientareassegmentationmodule.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,12 @@ class CV_EXPORTS_W TransientAreasSegmentationModule: public Algorithm
187187
/** @brief cleans all the buffers of the instance
188188
*/
189189
CV_WRAP virtual void clearAllBuffers()=0;
190-
};
191190

192-
/** @brief allocator
193-
@param inputSize : size of the images input to segment (output will be the same size)
194-
@relates bioinspired::TransientAreasSegmentationModule
195-
*/
196-
CV_EXPORTS_W Ptr<TransientAreasSegmentationModule> createTransientAreasSegmentationModule(Size inputSize);
191+
/** @brief allocator
192+
@param inputSize : size of the images input to segment (output will be the same size)
193+
*/
194+
CV_WRAP static Ptr<TransientAreasSegmentationModule> create(Size inputSize);
195+
};
197196

198197
//! @}
199198

modules/bioinspired/perf/opencl/perf_retina.ocl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ OCL_PERF_TEST_P(RetinaFixture, Retina,
2929
UMat ocl_parvo, ocl_magno;
3030

3131
{
32-
Ptr<cv::bioinspired::Retina> retina = cv::bioinspired::createRetina(
32+
Ptr<cv::bioinspired::Retina> retina = cv::bioinspired::Retina::create(
3333
input.size(), colorMode, colorSamplingMethod, useLogSampling,
3434
reductionFactor, samplingStrength);
3535

modules/bioinspired/samples/OpenEXRimages_HDR_Retina_toneMapping.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ int main(int argc, char* argv[])
220220
*/
221221
if (useLogSampling)
222222
{
223-
retina = cv::bioinspired::createRetina(inputImage.size(),true, cv::bioinspired::RETINA_COLOR_BAYER, true, 2.0, 10.0);
223+
retina = cv::bioinspired::Retina::create(inputImage.size(),true, cv::bioinspired::RETINA_COLOR_BAYER, true, 2.0, 10.0);
224224
}
225225
else// -> else allocate "classical" retina :
226-
retina = cv::bioinspired::createRetina(inputImage.size());
226+
retina = cv::bioinspired::Retina::create(inputImage.size());
227227

228228
// create a fast retina tone mapper (Meyla&al algorithm)
229229
std::cout<<"Allocating fast tone mapper..."<<std::endl;

modules/bioinspired/samples/basicRetina.cpp

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)