Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov committed Mar 4, 2014
1 parent af8aa8a commit 099ea91
Show file tree
Hide file tree
Showing 30 changed files with 78 additions and 78 deletions.
2 changes: 1 addition & 1 deletion modules/calib3d/perf/perf_pnp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ PERF_TEST_P(PointsNum, DISABLED_SolvePnPRansac, testing::Values(4, 3*9, 7*13))
Mat tvec;

#ifdef HAVE_TBB
// limit concurrency to get determenistic result
// limit concurrency to get deterministic result
cv::Ptr<tbb::task_scheduler_init> one_thread = new tbb::task_scheduler_init(1);
#endif

Expand Down
2 changes: 1 addition & 1 deletion modules/calib3d/test/test_solvepnp_ransac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ TEST(DISABLED_Calib3d_SolvePnPRansac, concurrency)
Mat tvec1, tvec2;

{
// limit concurrency to get determenistic result
// limit concurrency to get deterministic result
cv::theRNG().state = 20121010;
cv::Ptr<tbb::task_scheduler_init> one_thread = new tbb::task_scheduler_init(1);
solvePnPRansac(object, image, camera_mat, dist_coef, rvec1, tvec1);
Expand Down
4 changes: 2 additions & 2 deletions modules/contrib/src/imagelogpolprojection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,14 +362,14 @@ bool ImageLogPolProjection::_initLogPolarCortexSampling(const double reductionFa

//std::cout<<"ImageLogPolProjection::Starting cortex projection"<<std::endl;
// compute transformation, get theta and Radius in reagrd of the output sampled pixel
double diagonalLenght=sqrt((double)(_outputNBcolumns*_outputNBcolumns+_outputNBrows*_outputNBrows));
double diagonalLength=sqrt((double)(_outputNBcolumns*_outputNBcolumns+_outputNBrows*_outputNBrows));
for (unsigned int radiusIndex=0;radiusIndex<_outputNBcolumns;++radiusIndex)
for(unsigned int orientationIndex=0;orientationIndex<_outputNBrows;++orientationIndex)
{
double x=1.0+sinh(radiusAxis[radiusIndex])*cos(orientationAxis[orientationIndex]);
double y=sinh(radiusAxis[radiusIndex])*sin(orientationAxis[orientationIndex]);
// get the input picture coordinate
double R=diagonalLenght*sqrt(x*x+y*y)/(5.0+sqrt(x*x+y*y));
double R=diagonalLength*sqrt(x*x+y*y)/(5.0+sqrt(x*x+y*y));
double theta=atan2(y,x);
// convert input polar coord into cartesian/C compatble coordinate
unsigned int columnIndex=(unsigned int)(cos(theta)*R)+halfInputColumns;
Expand Down
2 changes: 1 addition & 1 deletion modules/contrib/src/lda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Mat subspaceReconstruct(InputArray _W, InputArray _mean, InputArray _src)
string error_message = format("Wrong mean shape for the given eigenvector matrix. Expected %d, but was %d.", W.cols, mean.total());
CV_Error(CV_StsBadArg, error_message);
}
// initalize temporary matrices
// initialize temporary matrices
Mat X, Y;
// copy data & make sure we are using the correct type
src.convertTo(Y, W.type());
Expand Down
10 changes: 5 additions & 5 deletions modules/contrib/src/templatebuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,27 +357,27 @@ namespace cv

for (unsigned int i=0;i<this->size();++i)
{
double curentValue=(double)*(bufferPTR++);
double currentValue=(double)*(bufferPTR++);

// updating "closest to the high threshold" pixel value
double highValueTest=maxThreshold-curentValue;
double highValueTest=maxThreshold-currentValue;
if (highValueTest>0)
{
if (deltaH>highValueTest)
{
deltaH=highValueTest;
updatedHighValue=curentValue;
updatedHighValue=currentValue;
}
}

// updating "closest to the low threshold" pixel value
double lowValueTest=curentValue-minThreshold;
double lowValueTest=currentValue-minThreshold;
if (lowValueTest>0)
{
if (deltaL>lowValueTest)
{
deltaL=lowValueTest;
updatedLowValue=curentValue;
updatedLowValue=currentValue;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/core/include/opencv2/core/core_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ CVAPI(void) cvResetImageROI( IplImage* image );
/* Retrieves image ROI */
CVAPI(CvRect) cvGetImageROI( const IplImage* image );

/* Allocates and initalizes CvMat header */
/* Allocates and initializes CvMat header */
CVAPI(CvMat*) cvCreateMatHeader( int rows, int cols, int type );

#define CV_AUTOSTEP 0x7fffffff
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2897,7 +2897,7 @@ cvCreateImage( CvSize size, int depth, int channels )
}


// initalize IplImage header, allocated by the user
// initialize IplImage header, allocated by the user
CV_IMPL IplImage*
cvInitImageHeader( IplImage * image, CvSize size, int depth,
int channels, int origin, int align )
Expand Down
6 changes: 3 additions & 3 deletions modules/features2d/doc/feature_detection_and_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ FAST
----
Detects corners using the FAST algorithm

.. ocv:function:: void FAST( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression=true )
.. ocv:function:: void FAST( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSuppression=true )
.. ocv:function:: void FASTX( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression, int type )
.. ocv:function:: void FASTX( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSuppression, int type )
:param image: grayscale image where keypoints (corners) are detected.

:param keypoints: keypoints detected on the image.

:param threshold: threshold on difference between intensity of the central pixel and pixels of a circle around this pixel.

:param nonmaxSupression: if true, non-maximum suppression is applied to detected corners (keypoints).
:param nonmaxSuppression: if true, non-maximum suppression is applied to detected corners (keypoints).

:param type: one of the three neighborhoods as defined in the paper: ``FastFeatureDetector::TYPE_9_16``, ``FastFeatureDetector::TYPE_7_12``, ``FastFeatureDetector::TYPE_5_8``

Expand Down
4 changes: 2 additions & 2 deletions modules/features2d/include/opencv2/features2d/features2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,10 +566,10 @@ class CV_EXPORTS_W StarDetector : public FeatureDetector

//! detects corners using FAST algorithm by E. Rosten
CV_EXPORTS void FAST( InputArray image, CV_OUT vector<KeyPoint>& keypoints,
int threshold, bool nonmaxSupression=true );
int threshold, bool nonmaxSuppression=true );

CV_EXPORTS void FASTX( InputArray image, CV_OUT vector<KeyPoint>& keypoints,
int threshold, bool nonmaxSupression, int type );
int threshold, bool nonmaxSuppression, int type );

class CV_EXPORTS_W FastFeatureDetector : public FeatureDetector
{
Expand Down
2 changes: 1 addition & 1 deletion modules/features2d/src/evaluation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class EllipticKeyPoint

Point2f center;
Scalar ellipse; // 3 elements a, b, c: ax^2+2bxy+cy^2=1
Size_<float> axes; // half lenght of elipse axes
Size_<float> axes; // half length of ellipse axes
Size_<float> boundingBox; // half sizes of bounding box which sides are parallel to the coordinate axes
};

Expand Down
12 changes: 6 additions & 6 deletions modules/gpu/doc/feature_detection_and_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Class used for corner detection using the FAST algorithm. ::
// all features have same size
static const int FEATURE_SIZE = 7;

explicit FAST_GPU(int threshold, bool nonmaxSupression = true,
explicit FAST_GPU(int threshold, bool nonmaxSuppression = true,
double keypointsRatio = 0.05);

void operator ()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints);
Expand All @@ -39,7 +39,7 @@ Class used for corner detection using the FAST algorithm. ::

void release();

bool nonmaxSupression;
bool nonmaxSuppression;

int threshold;

Expand All @@ -61,11 +61,11 @@ gpu::FAST_GPU::FAST_GPU
-------------------------------------
Constructor.

.. ocv:function:: gpu::FAST_GPU::FAST_GPU(int threshold, bool nonmaxSupression = true, double keypointsRatio = 0.05)
.. ocv:function:: gpu::FAST_GPU::FAST_GPU(int threshold, bool nonmaxSuppression = true, double keypointsRatio = 0.05)
:param threshold: Threshold on difference between intensity of the central pixel and pixels on a circle around this pixel.

:param nonmaxSupression: If it is true, non-maximum suppression is applied to detected corners (keypoints).
:param nonmaxSuppression: If it is true, non-maximum suppression is applied to detected corners (keypoints).

:param keypointsRatio: Inner buffer size for keypoints store is determined as (keypointsRatio * image_width * image_height).

Expand Down Expand Up @@ -115,7 +115,7 @@ Releases inner buffer memory.
gpu::FAST_GPU::calcKeyPointsLocation
-------------------------------------
Find keypoints and compute it's response if ``nonmaxSupression`` is true.
Find keypoints and compute it's response if ``nonmaxSuppression`` is true.

.. ocv:function:: int gpu::FAST_GPU::calcKeyPointsLocation(const GpuMat& image, const GpuMat& mask)
Expand Down Expand Up @@ -185,7 +185,7 @@ Class for extracting ORB features and descriptors from an image. ::
int descriptorSize() const;

void setParams(size_t n_features, const ORB::CommonParams& detector_params);
void setFastParams(int threshold, bool nonmaxSupression = true);
void setFastParams(int threshold, bool nonmaxSuppression = true);

void release();

Expand Down
12 changes: 6 additions & 6 deletions modules/gpu/include/opencv2/gpu/gpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ class CV_EXPORTS FAST_GPU
// all features have same size
static const int FEATURE_SIZE = 7;

explicit FAST_GPU(int threshold, bool nonmaxSupression = true, double keypointsRatio = 0.05);
explicit FAST_GPU(int threshold, bool nonmaxSuppression = true, double keypointsRatio = 0.05);

//! finds the keypoints using FAST detector
//! supports only CV_8UC1 images
Expand All @@ -1596,19 +1596,19 @@ class CV_EXPORTS FAST_GPU
//! release temporary buffer's memory
void release();

bool nonmaxSupression;
bool nonmaxSuppression;

int threshold;

//! max keypoints = keypointsRatio * img.size().area()
double keypointsRatio;

//! find keypoints and compute it's response if nonmaxSupression is true
//! find keypoints and compute it's response if nonmaxSuppression is true
//! return count of detected keypoints
int calcKeyPointsLocation(const GpuMat& image, const GpuMat& mask);

//! get final array of keypoints
//! performs nonmax supression if needed
//! performs nonmax suppression if needed
//! return final count of keypoints
int getKeyPoints(GpuMat& keypoints);

Expand Down Expand Up @@ -1670,10 +1670,10 @@ class CV_EXPORTS ORB_GPU
//! returns the descriptor size in bytes
inline int descriptorSize() const { return kBytes; }

inline void setFastParams(int threshold, bool nonmaxSupression = true)
inline void setFastParams(int threshold, bool nonmaxSuppression = true)
{
fastDetector_.threshold = threshold;
fastDetector_.nonmaxSupression = nonmaxSupression;
fastDetector_.nonmaxSuppression = nonmaxSuppression;
}

//! release temporary buffer's memory
Expand Down
4 changes: 2 additions & 2 deletions modules/gpu/perf/perf_features2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ using namespace perf;
//////////////////////////////////////////////////////////////////////
// FAST

DEF_PARAM_TEST(Image_Threshold_NonMaxSupression, string, int, bool);
DEF_PARAM_TEST(Image_Threshold_NonMaxSuppression, string, int, bool);

PERF_TEST_P(Image_Threshold_NonMaxSupression, Features2D_FAST,
PERF_TEST_P(Image_Threshold_NonMaxSuppression, Features2D_FAST,
Combine(Values<string>("gpu/perf/aloe.png"),
Values(20),
Bool()))
Expand Down
6 changes: 3 additions & 3 deletions modules/gpu/perf/perf_imgproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,7 @@ PERF_TEST_P(Image, ImgProc_HoughLinesP,
const float rho = 1.0f;
const float theta = static_cast<float>(CV_PI / 180.0);
const int threshold = 100;
const int minLineLenght = 50;
const int minLineLength = 50;
const int maxLineGap = 5;

const cv::Mat image = cv::imread(fileName, cv::IMREAD_GRAYSCALE);
Expand All @@ -1761,7 +1761,7 @@ PERF_TEST_P(Image, ImgProc_HoughLinesP,
cv::gpu::GpuMat d_lines;
cv::gpu::HoughLinesBuf d_buf;

TEST_CYCLE() cv::gpu::HoughLinesP(d_mask, d_lines, d_buf, rho, theta, minLineLenght, maxLineGap);
TEST_CYCLE() cv::gpu::HoughLinesP(d_mask, d_lines, d_buf, rho, theta, minLineLength, maxLineGap);

cv::Mat gpu_lines(d_lines);
cv::Vec4i* begin = gpu_lines.ptr<cv::Vec4i>();
Expand All @@ -1773,7 +1773,7 @@ PERF_TEST_P(Image, ImgProc_HoughLinesP,
{
std::vector<cv::Vec4i> cpu_lines;

TEST_CYCLE() cv::HoughLinesP(mask, cpu_lines, rho, theta, threshold, minLineLenght, maxLineGap);
TEST_CYCLE() cv::HoughLinesP(mask, cpu_lines, rho, theta, threshold, minLineLength, maxLineGap);

SANITY_CHECK(cpu_lines);
}
Expand Down
10 changes: 5 additions & 5 deletions modules/gpu/perf4au/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ PERF_TEST_P(Image, HoughLinesP, testing::Values(std::string("im1_1280x800.jpg"))
const float rho = 1.f;
const float theta = 1.f;
const int threshold = 40;
const int minLineLenght = 20;
const int minLineLength = 20;
const int maxLineGap = 5;

cv::Mat image = cv::imread(fileName, cv::IMREAD_GRAYSCALE);
Expand All @@ -85,11 +85,11 @@ PERF_TEST_P(Image, HoughLinesP, testing::Values(std::string("im1_1280x800.jpg"))
cv::gpu::GpuMat d_lines;
cv::gpu::HoughLinesBuf d_buf;

cv::gpu::HoughLinesP(d_image, d_lines, d_buf, rho, theta, minLineLenght, maxLineGap);
cv::gpu::HoughLinesP(d_image, d_lines, d_buf, rho, theta, minLineLength, maxLineGap);

TEST_CYCLE()
{
cv::gpu::HoughLinesP(d_image, d_lines, d_buf, rho, theta, minLineLenght, maxLineGap);
cv::gpu::HoughLinesP(d_image, d_lines, d_buf, rho, theta, minLineLength, maxLineGap);
}
}
else
Expand All @@ -98,11 +98,11 @@ PERF_TEST_P(Image, HoughLinesP, testing::Values(std::string("im1_1280x800.jpg"))
cv::Canny(image, mask, 50, 100);

std::vector<cv::Vec4i> lines;
cv::HoughLinesP(mask, lines, rho, theta, threshold, minLineLenght, maxLineGap);
cv::HoughLinesP(mask, lines, rho, theta, threshold, minLineLength, maxLineGap);

TEST_CYCLE()
{
cv::HoughLinesP(mask, lines, rho, theta, threshold, minLineLenght, maxLineGap);
cv::HoughLinesP(mask, lines, rho, theta, threshold, minLineLength, maxLineGap);
}
}

Expand Down
8 changes: 4 additions & 4 deletions modules/gpu/src/cuda/fast.cu
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ namespace cv { namespace gpu { namespace device
}

///////////////////////////////////////////////////////////////////////////
// nonmaxSupression
// nonmaxSuppression

__global__ void nonmaxSupression(const short2* kpLoc, int count, const PtrStepSzi scoreMat, short2* locFinal, float* responseFinal)
__global__ void nonmaxSuppression(const short2* kpLoc, int count, const PtrStepSzi scoreMat, short2* locFinal, float* responseFinal)
{
#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 110)

Expand Down Expand Up @@ -356,7 +356,7 @@ namespace cv { namespace gpu { namespace device
#endif
}

int nonmaxSupression_gpu(const short2* kpLoc, int count, PtrStepSzi score, short2* loc, float* response)
int nonmaxSuppression_gpu(const short2* kpLoc, int count, PtrStepSzi score, short2* loc, float* response)
{
void* counter_ptr;
cudaSafeCall( cudaGetSymbolAddress(&counter_ptr, g_counter) );
Expand All @@ -368,7 +368,7 @@ namespace cv { namespace gpu { namespace device

cudaSafeCall( cudaMemset(counter_ptr, 0, sizeof(unsigned int)) );

nonmaxSupression<<<grid, block>>>(kpLoc, count, score, loc, response);
nonmaxSuppression<<<grid, block>>>(kpLoc, count, score, loc, response);
cudaSafeCall( cudaGetLastError() );

cudaSafeCall( cudaDeviceSynchronize() );
Expand Down
14 changes: 7 additions & 7 deletions modules/gpu/src/fast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ int cv::gpu::FAST_GPU::getKeyPoints(GpuMat&) { throw_nogpu(); return 0; }

#else /* !defined (HAVE_CUDA) */

cv::gpu::FAST_GPU::FAST_GPU(int _threshold, bool _nonmaxSupression, double _keypointsRatio) :
nonmaxSupression(_nonmaxSupression), threshold(_threshold), keypointsRatio(_keypointsRatio), count_(0)
cv::gpu::FAST_GPU::FAST_GPU(int _threshold, bool _nonmaxSuppression, double _keypointsRatio) :
nonmaxSuppression(_nonmaxSuppression), threshold(_threshold), keypointsRatio(_keypointsRatio), count_(0)
{
}

Expand Down Expand Up @@ -114,7 +114,7 @@ namespace cv { namespace gpu { namespace device
namespace fast
{
int calcKeypoints_gpu(PtrStepSzb img, PtrStepSzb mask, short2* kpLoc, int maxKeypoints, PtrStepSzi score, int threshold);
int nonmaxSupression_gpu(const short2* kpLoc, int count, PtrStepSzi score, short2* loc, float* response);
int nonmaxSuppression_gpu(const short2* kpLoc, int count, PtrStepSzi score, short2* loc, float* response);
}
}}}

Expand All @@ -129,13 +129,13 @@ int cv::gpu::FAST_GPU::calcKeyPointsLocation(const GpuMat& img, const GpuMat& ma

ensureSizeIsEnough(1, maxKeypoints, CV_16SC2, kpLoc_);

if (nonmaxSupression)
if (nonmaxSuppression)
{
ensureSizeIsEnough(img.size(), CV_32SC1, score_);
score_.setTo(Scalar::all(0));
}

count_ = calcKeypoints_gpu(img, mask, kpLoc_.ptr<short2>(), maxKeypoints, nonmaxSupression ? score_ : PtrStepSzi(), threshold);
count_ = calcKeypoints_gpu(img, mask, kpLoc_.ptr<short2>(), maxKeypoints, nonmaxSuppression ? score_ : PtrStepSzi(), threshold);
count_ = std::min(count_, maxKeypoints);

return count_;
Expand All @@ -150,8 +150,8 @@ int cv::gpu::FAST_GPU::getKeyPoints(GpuMat& keypoints)

ensureSizeIsEnough(ROWS_COUNT, count_, CV_32FC1, keypoints);

if (nonmaxSupression)
return nonmaxSupression_gpu(kpLoc_.ptr<short2>(), count_, score_, keypoints.ptr<short2>(LOCATION_ROW), keypoints.ptr<float>(RESPONSE_ROW));
if (nonmaxSuppression)
return nonmaxSuppression_gpu(kpLoc_.ptr<short2>(), count_, score_, keypoints.ptr<short2>(LOCATION_ROW), keypoints.ptr<float>(RESPONSE_ROW));

GpuMat locRow(1, count_, kpLoc_.type(), keypoints.ptr(0));
kpLoc_.colRange(0, count_).copyTo(locRow);
Expand Down
Loading

0 comments on commit 099ea91

Please sign in to comment.