Skip to content

Commit 0a8d841

Browse files
atinfinityalalek
authored andcommitted
Merge pull request #2412 from atinfinity:fixed-typo
* fixed typo * fixed document
1 parent 5834bea commit 0a8d841

File tree

19 files changed

+59
-59
lines changed

19 files changed

+59
-59
lines changed

modules/aruco/include/opencv2/aruco/charuco.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class CV_EXPORTS_W CharucoBoard : public Board {
124124
// size of chessboard squares side (normally in meters)
125125
float _squareLength;
126126

127-
// marker side lenght (normally in meters)
127+
// marker side length (normally in meters)
128128
float _markerLength;
129129
};
130130

modules/aruco/samples/detect_board.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const char* about = "Pose estimation using a ArUco Planar Grid board";
5050
const char* keys =
5151
"{w | | Number of squares in X direction }"
5252
"{h | | Number of squares in Y direction }"
53-
"{l | | Marker side lenght (in pixels) }"
53+
"{l | | Marker side length (in pixels) }"
5454
"{s | | Separation between two consecutive markers in the grid (in pixels)}"
5555
"{d | | dictionary: DICT_4X4_50=0, DICT_4X4_100=1, DICT_4X4_250=2,"
5656
"DICT_4X4_1000=3, DICT_5X5_50=4, DICT_5X5_100=5, DICT_5X5_250=6, DICT_5X5_1000=7, "

modules/aruco/samples/detect_markers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const char* keys =
5555
"{v | | Input from video file, if ommited, input comes from camera }"
5656
"{ci | 0 | Camera id if input doesnt come from video (-v) }"
5757
"{c | | Camera intrinsic parameters. Needed for camera pose }"
58-
"{l | 0.1 | Marker side lenght (in meters). Needed for correct scale in camera pose }"
58+
"{l | 0.1 | Marker side length (in meters). Needed for correct scale in camera pose }"
5959
"{dp | | File of marker detector parameters }"
6060
"{r | | show rejected candidates too }"
6161
"{refine | | Corner refinement: CORNER_REFINE_NONE=0, CORNER_REFINE_SUBPIX=1,"

modules/aruco/tutorials/aruco_board_detection/aruco_board_detection.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ A ```GridBoard``` object can be defined using the following parameters:
113113

114114
- Number of markers in the X direction.
115115
- Number of markers in the Y direction.
116-
- Lenght of the marker side.
116+
- Length of the marker side.
117117
- Length of the marker separation.
118118
- The dictionary of the markers.
119119
- Ids of all the markers (X*Y markers).

modules/bioinspired/doc/retina.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ functions (C++, Java, Python) :
207207

208208
// Allocators
209209
cv::Ptr<Retina> Retina::create (Size inputSize);
210-
cv::Ptr<Retina> Retina::create (Size inputSize, const bool colorMode, RETINA_COLORSAMPLINGMETHOD colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const double reductionFactor=1.0, const double samplingStrenght=10.0);
210+
cv::Ptr<Retina> Retina::create (Size inputSize, const bool colorMode, RETINA_COLORSAMPLINGMETHOD colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const double reductionFactor=1.0, const double samplingStrength=10.0);
211211
}} // cv and bioinspired namespaces end
212212
@endcode
213213

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,13 @@ class CV_EXPORTS_W Retina : public Algorithm {
438438
@param reductionFactor only usefull if param useRetinaLogSampling=true, specifies the reduction
439439
factor of the output frame (as the center (fovea) is high resolution and corners can be
440440
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
441+
@param samplingStrength only usefull if param useRetinaLogSampling=true, specifies the strength of
442442
the log scale that is applied
443443
*/
444444
CV_WRAP static Ptr<Retina> create(Size inputSize, const bool colorMode,
445445
int colorSamplingMethod=RETINA_COLOR_BAYER,
446446
const bool useRetinaLogSampling=false,
447-
const float reductionFactor=1.0f, const float samplingStrenght=10.0f);
447+
const float reductionFactor=1.0f, const float samplingStrength=10.0f);
448448
};
449449

450450
//! @}

modules/bioinspired/src/basicretinafilter.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ namespace bioinspired
257257
* @param beta: gain of the filter (generally set to zero)
258258
* @param tau: time constant of the filter (unit is frame for video processing)
259259
* @param alpha0: spatial constant of the filter (unit is pixels) on the border of the image
260-
* @param accuracyMap an image (float format) which values range is between 0 and 1, where 0 means, apply no filtering and 1 means apply the filtering as specified in the parameters set, intermediate values allow to smooth variations of the filtering strenght
260+
* @param accuracyMap an image (float format) which values range is between 0 and 1, where 0 means, apply no filtering and 1 means apply the filtering as specified in the parameters set, intermediate values allow to smooth variations of the filtering strength
261261
* @param filterIndex: the index which specifies the parameter set that should be used for the filtering
262262
*/
263263
void setProgressiveFilterConstants_CustomAccuracy(const float beta, const float tau, const float alpha0, const std::valarray<float> &accuracyMap, const unsigned int filterIndex=0);

modules/bioinspired/src/imagelogpolprojection.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,33 +125,33 @@ void ImageLogPolProjection::clearAllBuffers()
125125
void ImageLogPolProjection::resize(const unsigned int NBrows, const unsigned int NBcolumns)
126126
{
127127
BasicRetinaFilter::resize(NBrows, NBcolumns);
128-
initProjection(_reductionFactor, _samplingStrenght);
128+
initProjection(_reductionFactor, _samplingStrength);
129129

130130
// reset buffers method
131131
clearAllBuffers();
132132

133133
}
134134

135135
// init functions depending on the projection type
136-
bool ImageLogPolProjection::initProjection(const double reductionFactor, const double samplingStrenght)
136+
bool ImageLogPolProjection::initProjection(const double reductionFactor, const double samplingStrength)
137137
{
138138
switch(_selectedProjection)
139139
{
140140
case RETINALOGPROJECTION:
141-
return _initLogRetinaSampling(reductionFactor, samplingStrenght);
141+
return _initLogRetinaSampling(reductionFactor, samplingStrength);
142142
break;
143143
case CORTEXLOGPOLARPROJECTION:
144-
return _initLogPolarCortexSampling(reductionFactor, samplingStrenght);
144+
return _initLogPolarCortexSampling(reductionFactor, samplingStrength);
145145
break;
146146
default:
147147
std::cout<<"ImageLogPolProjection::no projection setted up... performing default retina projection... take care"<<std::endl;
148-
return _initLogRetinaSampling(reductionFactor, samplingStrenght);
148+
return _initLogRetinaSampling(reductionFactor, samplingStrength);
149149
break;
150150
}
151151
}
152152

153153
// -> private init functions dedicated to each projection
154-
bool ImageLogPolProjection::_initLogRetinaSampling(const double reductionFactor, const double samplingStrenght)
154+
bool ImageLogPolProjection::_initLogRetinaSampling(const double reductionFactor, const double samplingStrength)
155155
{
156156
_initOK=false;
157157

@@ -173,7 +173,7 @@ bool ImageLogPolProjection::_initLogRetinaSampling(const double reductionFactor,
173173
_outputDoubleNBpixels=_outputNBrows*_outputNBcolumns*2;
174174

175175
#ifdef IMAGELOGPOLPROJECTION_DEBUG
176-
std::cout<<"ImageLogPolProjection::initLogRetinaSampling: Log resampled image resampling factor: "<<reductionFactor<<", strenght:"<<samplingStrenght<<std::endl;
176+
std::cout<<"ImageLogPolProjection::initLogRetinaSampling: Log resampled image resampling factor: "<<reductionFactor<<", strength:"<<samplingStrength<<std::endl;
177177
std::cout<<"ImageLogPolProjection::initLogRetinaSampling: Log resampled image size: "<<_outputNBrows<<"*"<<_outputNBcolumns<<std::endl;
178178
#endif
179179

@@ -185,16 +185,16 @@ bool ImageLogPolProjection::_initLogRetinaSampling(const double reductionFactor,
185185

186186
// specifiying new reduction factor after preliminar checks
187187
_reductionFactor=reductionFactor;
188-
_samplingStrenght=samplingStrenght;
188+
_samplingStrength=samplingStrength;
189189

190190
// compute the rlim for symetric rows/columns sampling, then, the rlim is based on the smallest dimension
191191
_minDimension=(double)(_filterOutput.getNBrows() < _filterOutput.getNBcolumns() ? _filterOutput.getNBrows() : _filterOutput.getNBcolumns());
192192

193193
// input frame dimensions dependent log sampling:
194-
//double rlim=1.0/reductionFactor*(minDimension/2.0+samplingStrenght);
194+
//double rlim=1.0/reductionFactor*(minDimension/2.0+samplingStrength);
195195

196196
// input frame dimensions INdependent log sampling:
197-
_azero=(1.0+reductionFactor*std::sqrt(samplingStrenght))/(reductionFactor*reductionFactor*samplingStrenght-1.0);
197+
_azero=(1.0+reductionFactor*std::sqrt(samplingStrength))/(reductionFactor*reductionFactor*samplingStrength-1.0);
198198
_alim=(1.0+_azero)/reductionFactor;
199199
#ifdef IMAGELOGPOLPROJECTION_DEBUG
200200
std::cout<<"ImageLogPolProjection::initLogRetinaSampling: rlim= "<<rlim<<std::endl;
@@ -224,7 +224,7 @@ bool ImageLogPolProjection::_initLogRetinaSampling(const double reductionFactor,
224224
// get the pixel position in the original picture
225225

226226
// -> input frame dimensions dependent log sampling:
227-
//double scale = samplingStrenght/(rlim-(double)std::sqrt(idRow*idRow+idColumn*idColumn));
227+
//double scale = samplingStrength/(rlim-(double)std::sqrt(idRow*idRow+idColumn*idColumn));
228228

229229
// -> input frame dimensions INdependent log sampling:
230230
double scale=getOriginalRadiusLength((double)std::sqrt((double)(idRow*idRow+idColumn*idColumn)));
@@ -363,14 +363,14 @@ bool ImageLogPolProjection::_initLogPolarCortexSampling(const double reductionFa
363363

364364
//std::cout<<"ImageLogPolProjection::Starting cortex projection"<<std::endl;
365365
// compute transformation, get theta and Radius in reagrd of the output sampled pixel
366-
double diagonalLenght=std::sqrt((double)(_outputNBcolumns*_outputNBcolumns+_outputNBrows*_outputNBrows));
366+
double diagonalLength=std::sqrt((double)(_outputNBcolumns*_outputNBcolumns+_outputNBrows*_outputNBrows));
367367
for (unsigned int radiusIndex=0;radiusIndex<_outputNBcolumns;++radiusIndex)
368368
for(unsigned int orientationIndex=0;orientationIndex<_outputNBrows;++orientationIndex)
369369
{
370370
double x=1.0+sinh(radiusAxis[radiusIndex])*cos(orientationAxis[orientationIndex]);
371371
double y=sinh(radiusAxis[radiusIndex])*sin(orientationAxis[orientationIndex]);
372372
// get the input picture coordinate
373-
double R=diagonalLenght*std::sqrt(x*x+y*y)/(5.0+std::sqrt(x*x+y*y));
373+
double R=diagonalLength*std::sqrt(x*x+y*y)/(5.0+std::sqrt(x*x+y*y));
374374
double theta=atan2(y,x);
375375
// convert input polar coord into cartesian/C compatble coordinate
376376
unsigned int columnIndex=(unsigned int)(cos(theta)*R)+halfInputColumns;

modules/bioinspired/src/imagelogpolprojection.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ class ImageLogPolProjection:public BasicRetinaFilter
142142
/**
143143
* init function depending on the projection type
144144
* @param reductionFactor: the size reduction factor of the ouptup image in regard of the size of the input image, must be superior to 1
145-
* @param samplingStrenght: specifies the strenght of the log compression effect (magnifying coefficient)
145+
* @param samplingStrength: specifies the strength of the log compression effect (magnifying coefficient)
146146
* @return true if the init was performed without any errors
147147
*/
148-
bool initProjection(const double reductionFactor, const double samplingStrenght);
148+
bool initProjection(const double reductionFactor, const double samplingStrength);
149149

150150
/**
151151
* main funtion of the class: run projection function
@@ -206,8 +206,8 @@ class ImageLogPolProjection:public BasicRetinaFilter
206206

207207
// is the object able to manage color flag
208208
bool _colorModeCapable;
209-
// sampling strenght factor
210-
double _samplingStrenght;
209+
// sampling strength factor
210+
double _samplingStrength;
211211
// sampling reduction factor
212212
double _reductionFactor;
213213

@@ -231,8 +231,8 @@ class ImageLogPolProjection:public BasicRetinaFilter
231231
// specifies if init was done correctly
232232
bool _initOK;
233233
// private init projections functions called by "initProjection(...)" function
234-
bool _initLogRetinaSampling(const double reductionFactor, const double samplingStrenght);
235-
bool _initLogPolarCortexSampling(const double reductionFactor, const double samplingStrenght);
234+
bool _initLogRetinaSampling(const double reductionFactor, const double samplingStrength);
235+
bool _initLogPolarCortexSampling(const double reductionFactor, const double samplingStrength);
236236

237237
ImageLogPolProjection(const ImageLogPolProjection&);
238238
ImageLogPolProjection& operator=(const ImageLogPolProjection&);

modules/bioinspired/src/retina.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ class RetinaImpl CV_FINAL : public Retina
9696
* @param colorSamplingMethod: specifies which kind of color sampling will be used
9797
* @param useRetinaLogSampling: activate retina log sampling, if true, the 2 following parameters can be used
9898
* @param reductionFactor: only usefull if param useRetinaLogSampling=true, specifies the reduction factor of the output frame (as the center (fovea) is high resolution and corners can be underscaled, then a reduction of the output is allowed without precision leak
99-
* @param samplingStrenght: only usefull if param useRetinaLogSampling=true, specifies the strenght of the log scale that is applied
99+
* @param samplingStrength: only usefull if param useRetinaLogSampling=true, specifies the strength of the log scale that is applied
100100
*/
101-
RetinaImpl(const Size inputSize, const bool colorMode, int colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const float reductionFactor=1.0f, const float samplingStrenght=10.0f);
101+
RetinaImpl(const Size inputSize, const bool colorMode, int colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const float reductionFactor=1.0f, const float samplingStrength=10.0f);
102102

103103
virtual ~RetinaImpl() CV_OVERRIDE;
104104
/**
@@ -272,7 +272,7 @@ class RetinaImpl CV_FINAL : public Retina
272272
cv::Ptr<RetinaFilter> _retinaFilter; //!< the pointer to the retina module, allocated with instance construction
273273

274274
//! private method called by constructors, gathers their parameters and use them in a unified way
275-
void _init(const Size inputSize, const bool colorMode, int colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const float reductionFactor=1.0f, const float samplingStrenght=10.0f);
275+
void _init(const Size inputSize, const bool colorMode, int colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const float reductionFactor=1.0f, const float samplingStrength=10.0f);
276276

277277
/**
278278
* exports a valarray buffer outing from bioinspired objects to a cv::Mat in CV_8UC1 (gray level picture) or CV_8UC3 (color) format
@@ -311,9 +311,9 @@ Ptr<Retina> Retina::create(Size inputSize)
311311
return makePtr<RetinaImpl>(inputSize);
312312
}
313313

314-
Ptr<Retina> Retina::create(Size inputSize, const bool colorMode, int colorSamplingMethod, const bool useRetinaLogSampling, const float reductionFactor, const float samplingStrenght)
314+
Ptr<Retina> Retina::create(Size inputSize, const bool colorMode, int colorSamplingMethod, const bool useRetinaLogSampling, const float reductionFactor, const float samplingStrength)
315315
{
316-
return makePtr<RetinaImpl>(inputSize, colorMode, colorSamplingMethod, useRetinaLogSampling, reductionFactor, samplingStrenght);
316+
return makePtr<RetinaImpl>(inputSize, colorMode, colorSamplingMethod, useRetinaLogSampling, reductionFactor, samplingStrength);
317317
}
318318

319319

@@ -327,13 +327,13 @@ RetinaImpl::RetinaImpl(const cv::Size inputSz)
327327
#endif
328328
}
329329

330-
RetinaImpl::RetinaImpl(const cv::Size inputSz, const bool colorMode, int colorSamplingMethod, const bool useRetinaLogSampling, const float reductionFactor, const float samplingStrenght)
330+
RetinaImpl::RetinaImpl(const cv::Size inputSz, const bool colorMode, int colorSamplingMethod, const bool useRetinaLogSampling, const float reductionFactor, const float samplingStrength)
331331
{
332-
_init(inputSz, colorMode, colorSamplingMethod, useRetinaLogSampling, reductionFactor, samplingStrenght);
332+
_init(inputSz, colorMode, colorSamplingMethod, useRetinaLogSampling, reductionFactor, samplingStrength);
333333
#ifdef HAVE_OPENCL
334334
if (inputSz.width % 4 == 0 && !useRetinaLogSampling && cv::ocl::useOpenCL())
335335
_ocl_retina.reset(new ocl::RetinaOCLImpl(inputSz, colorMode, colorSamplingMethod,
336-
useRetinaLogSampling, reductionFactor, samplingStrenght));
336+
useRetinaLogSampling, reductionFactor, samplingStrength));
337337
#endif
338338
}
339339

@@ -712,7 +712,7 @@ const Mat RetinaImpl::getParvoRAW() const {
712712
}
713713

714714
// private method called by constructors
715-
void RetinaImpl::_init(const cv::Size inputSz, const bool colorMode, int colorSamplingMethod, const bool useRetinaLogSampling, const float reductionFactor, const float samplingStrenght)
715+
void RetinaImpl::_init(const cv::Size inputSz, const bool colorMode, int colorSamplingMethod, const bool useRetinaLogSampling, const float reductionFactor, const float samplingStrength)
716716
{
717717
_wasOCLRunCalled = false;
718718
// basic error check
@@ -724,7 +724,7 @@ void RetinaImpl::_init(const cv::Size inputSz, const bool colorMode, int colorSa
724724
_inputBuffer.resize(nbPixels*3); // buffer supports gray images but also 3 channels color buffers... (larger is better...)
725725

726726
// allocate the retina model
727-
_retinaFilter.reset(new RetinaFilter(inputSz.height, inputSz.width, colorMode, colorSamplingMethod, useRetinaLogSampling, reductionFactor, samplingStrenght));
727+
_retinaFilter.reset(new RetinaFilter(inputSz.height, inputSz.width, colorMode, colorSamplingMethod, useRetinaLogSampling, reductionFactor, samplingStrength));
728728

729729
_retinaParameters.OPLandIplParvo.colorMode = colorMode;
730730
// prepare the default parameter XML file with default setup

0 commit comments

Comments
 (0)