From c058072d6260659411a6d4160789bac32a2d3d67 Mon Sep 17 00:00:00 2001 From: raimbekovm Date: Fri, 26 Dec 2025 23:42:51 +0600 Subject: [PATCH] docs: fix typos in documentation and code comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed 19 typos across 15 files: - properies → properties - posible → possible (2×) - indeces → indices - matrixs → matrices (2×) - grater → greater - whith → with - ouput → output - choosen → chosen (4×) - constains → contains - refrence → reference - dont → don't (4×) - cant → can't --- modules/calib3d/src/calibinit.cpp | 2 +- modules/calib3d/src/chessboard.cpp | 2 +- modules/calib3d/src/usac.hpp | 2 +- modules/calib3d/test/test_cameracalibration.cpp | 4 ++-- modules/dnn/src/onnx/onnx_importer.cpp | 2 +- modules/dnn/src/op_timvx.cpp | 2 +- modules/features2d/src/sift.simd.hpp | 2 +- .../include/opencv2/objdetect/aruco_detector.hpp | 2 +- .../include/opencv2/objdetect/aruco_dictionary.hpp | 2 +- modules/objdetect/src/aruco/aruco_board.cpp | 4 ++-- modules/objdetect/src/aruco/aruco_detector.cpp | 2 +- modules/objdetect/src/aruco/charuco_detector.cpp | 2 +- modules/stitching/include/opencv2/stitching.hpp | 2 +- modules/video/test/test_ecc.cpp | 2 +- modules/videoio/src/cap.cpp | 8 ++++---- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/calib3d/src/calibinit.cpp b/modules/calib3d/src/calibinit.cpp index c335da7833..ed619b7d54 100644 --- a/modules/calib3d/src/calibinit.cpp +++ b/modules/calib3d/src/calibinit.cpp @@ -671,7 +671,7 @@ bool findChessboardCorners(InputArray image_, Size pattern_size, std::vector out_corners; if (is_plain) - CV_CheckType(type, depth == CV_8U && cn == 1, "Only 8-bit grayscale images are supported whith CALIB_CB_PLAIN flag enable"); + CV_CheckType(type, depth == CV_8U && cn == 1, "Only 8-bit grayscale images are supported with CALIB_CB_PLAIN flag enable"); if (img.channels() != 1) { diff --git a/modules/calib3d/src/chessboard.cpp b/modules/calib3d/src/chessboard.cpp index 5855c3f255..4ad7bf74c8 100644 --- a/modules/calib3d/src/chessboard.cpp +++ b/modules/calib3d/src/chessboard.cpp @@ -2242,7 +2242,7 @@ int Chessboard::Board::detectMarkers(cv::InputArray image) cv::bitwise_and(field,mask2,temp); double noise= cv::sum(temp)[0]/noise_size; - // calc refrence value + // calc reference value Cell *cell2 = getCell(y,abs(x-1)); src[0] = *cell2->top_left; src[1] = *cell2->top_right; diff --git a/modules/calib3d/src/usac.hpp b/modules/calib3d/src/usac.hpp index c68416dafe..023aabb1c8 100644 --- a/modules/calib3d/src/usac.hpp +++ b/modules/calib3d/src/usac.hpp @@ -68,7 +68,7 @@ class NormTransform : public Algorithm { public: /* * @norm_points is output matrix of size pts_size x 4 - * @sample constains indices of points + * @sample contains indices of points * @sample_number is number of used points in sample <0; sample_number) * @T1, T2 are output transformation matrices */ diff --git a/modules/calib3d/test/test_cameracalibration.cpp b/modules/calib3d/test/test_cameracalibration.cpp index e36ca3e1c4..41751e15ee 100644 --- a/modules/calib3d/test/test_cameracalibration.cpp +++ b/modules/calib3d/test/test_cameracalibration.cpp @@ -626,7 +626,7 @@ void CV_CameraCalibrationTest::run( int start_from ) if( code < 0 ) break; - /* ----- Compare rot matrixs ----- */ + /* ----- Compare rot matrices ----- */ CV_Assert(rotMatrs.size() == (size_t)numImages); CV_Assert(transVects.size() == (size_t)numImages); @@ -646,7 +646,7 @@ void CV_CameraCalibrationTest::run( int start_from ) if( code < 0 ) break; - /* ----- Compare rot matrixs ----- */ + /* ----- Compare rot matrices ----- */ code = compare(transVects[0].val, goodTransVects[0].val, 3*numImages, 0.1, "translation vectors"); if( code < 0 ) break; diff --git a/modules/dnn/src/onnx/onnx_importer.cpp b/modules/dnn/src/onnx/onnx_importer.cpp index 07bb442003..5af114e803 100644 --- a/modules/dnn/src/onnx/onnx_importer.cpp +++ b/modules/dnn/src/onnx/onnx_importer.cpp @@ -1299,7 +1299,7 @@ void ONNXImporter::parseSlice(LayerParams& layerParams, const opencv_onnx::NodeP { // dims should be added to the negative axes cur_axe = axes_.getIntValue(i) < 0 ? axes_.getIntValue(i) + dims : axes_.getIntValue(i); - CV_CheckGE(cur_axe, 0, "Axes should be grater or equal to '-dims'."); + CV_CheckGE(cur_axe, 0, "Axes should be greater or equal to '-dims'."); CV_CheckLT(cur_axe, dims, "Axes should be less than 'dim'."); CV_CheckEQ(flag[cur_axe], false, "Axes shouldn't have duplicated values."); flag[cur_axe] = true; diff --git a/modules/dnn/src/op_timvx.cpp b/modules/dnn/src/op_timvx.cpp index 107d660d39..4d1bbbc884 100644 --- a/modules/dnn/src/op_timvx.cpp +++ b/modules/dnn/src/op_timvx.cpp @@ -905,7 +905,7 @@ void forwardTimVX(std::vector >& outputs, const Ptr outWarpper; for (int i = 0; i < outputs.size(); i++) { diff --git a/modules/features2d/src/sift.simd.hpp b/modules/features2d/src/sift.simd.hpp index 76ef3082ea..b6c44853cf 100644 --- a/modules/features2d/src/sift.simd.hpp +++ b/modules/features2d/src/sift.simd.hpp @@ -604,7 +604,7 @@ public: } } - } else { // val cant be zero here (first abs took care of zero), must be negative + } else { // val can't be zero here (first abs took care of zero), must be negative sift_wt vmin = std::min(std::min(std::min(_00,_01),std::min(_02,_10)),std::min(std::min(_12,_20),std::min(_21,_22))); if (val <= vmin) { diff --git a/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp b/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp index c6ae25b718..9f3e28c511 100644 --- a/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp +++ b/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp @@ -258,7 +258,7 @@ struct CV_EXPORTS_W_SIMPLE RefineParameters { */ CV_PROP_RW float errorCorrectionRate; - /** @brief checkAllOrders consider the four posible corner orders in the rejectedCorners array. + /** @brief checkAllOrders consider the four possible corner orders in the rejectedCorners array. * * If it set to false, only the provided corner order is considered (default true). */ diff --git a/modules/objdetect/include/opencv2/objdetect/aruco_dictionary.hpp b/modules/objdetect/include/opencv2/objdetect/aruco_dictionary.hpp index 6a90876bf9..5f6fae64df 100644 --- a/modules/objdetect/include/opencv2/objdetect/aruco_dictionary.hpp +++ b/modules/objdetect/include/opencv2/objdetect/aruco_dictionary.hpp @@ -67,7 +67,7 @@ class CV_EXPORTS_W_SIMPLE Dictionary { /** @brief Returns Hamming distance of the input bits to the specific id. * - * If `allRotations` flag is set, the four posible marker rotations are considered + * If `allRotations` flag is set, the four possible marker rotations are considered */ CV_WRAP int getDistanceToId(InputArray bits, int id, bool allRotations = true) const; diff --git a/modules/objdetect/src/aruco/aruco_board.cpp b/modules/objdetect/src/aruco/aruco_board.cpp index b6a6653d40..0c613fdd18 100644 --- a/modules/objdetect/src/aruco/aruco_board.cpp +++ b/modules/objdetect/src/aruco/aruco_board.cpp @@ -518,9 +518,9 @@ void CharucoBoardImpl::generateImage(Size outSize, OutputArray img, int marginSi for(int x = 0; x < size.width; x++) { if(legacyPattern && (size.height % 2 == 0)) { // legacy behavior only for even row count patterns - if((y + 1) % 2 != x % 2) continue; // white corner, dont do anything + if((y + 1) % 2 != x % 2) continue; // white corner, don't do anything } else { - if(y % 2 != x % 2) continue; // white corner, dont do anything + if(y % 2 != x % 2) continue; // white corner, don't do anything } float startX = pixInSquare * float(x); diff --git a/modules/objdetect/src/aruco/aruco_detector.cpp b/modules/objdetect/src/aruco/aruco_detector.cpp index 19343bf1c2..914580381b 100644 --- a/modules/objdetect/src/aruco/aruco_detector.cpp +++ b/modules/objdetect/src/aruco/aruco_detector.cpp @@ -1399,7 +1399,7 @@ void ArucoDetector::refineDetectedMarkers(InputArray _image, const Board& _board // last filter, check if inner code is close enough to the assigned marker code int codeDistance = 0; - // if errorCorrectionRate, dont check code + // if errorCorrectionRate, don't check code if(refineParams.errorCorrectionRate >= 0) { // extract bits diff --git a/modules/objdetect/src/aruco/charuco_detector.cpp b/modules/objdetect/src/aruco/charuco_detector.cpp index 37aca01b36..c85f214366 100644 --- a/modules/objdetect/src/aruco/charuco_detector.cpp +++ b/modules/objdetect/src/aruco/charuco_detector.cpp @@ -117,7 +117,7 @@ struct CharucoDetector::CharucoDetectorImpl { minDist = min(dist, minDist); counter++; } - // if this is the first closest marker, dont do anything + // if this is the first closest marker, don't do anything if(counter == 0) continue; else { diff --git a/modules/stitching/include/opencv2/stitching.hpp b/modules/stitching/include/opencv2/stitching.hpp index 41f0550618..470af5599f 100644 --- a/modules/stitching/include/opencv2/stitching.hpp +++ b/modules/stitching/include/opencv2/stitching.hpp @@ -299,7 +299,7 @@ public: */ CV_WRAP Status stitch(InputArrayOfArrays images, InputArrayOfArrays masks, OutputArray pano); - /** @brief Returns indeces of input images used in panorama stitching + /** @brief Returns indices of input images used in panorama stitching */ CV_WRAP std::vector component() const { return indices_; } diff --git a/modules/video/test/test_ecc.cpp b/modules/video/test/test_ecc.cpp index 18438b7539..0bb3045dbc 100644 --- a/modules/video/test/test_ecc.cpp +++ b/modules/video/test/test_ecc.cpp @@ -414,7 +414,7 @@ void testECCProperties(Mat x, float eps) { EXPECT_NEAR(computeECC(X, 2 * Y + X), 1.0 / sqrt(5.0), eps); } -TEST(Video_ECC_Test_Compute, properies) { +TEST(Video_ECC_Test_Compute, properties) { Mat xline(1, 100, CV_32F), x; for (int i = 0; i < xline.cols; ++i) xline.at(0, i) = (float)i; diff --git a/modules/videoio/src/cap.cpp b/modules/videoio/src/cap.cpp index 97f5736052..45dba466ea 100644 --- a/modules/videoio/src/cap.cpp +++ b/modules/videoio/src/cap.cpp @@ -231,7 +231,7 @@ bool VideoCapture::open(const String& filename, int apiPreference, const std::ve } else { - CV_LOG_DEBUG(NULL, "VIDEOIO: choosen backend does not work or wrong. " + CV_LOG_DEBUG(NULL, "VIDEOIO: chosen backend does not work or wrong. " "Please make sure that your computer support chosen backend and OpenCV built " "with right flags."); } @@ -356,7 +356,7 @@ bool VideoCapture::open(const Ptr& stream, int apiPreference, con } else { - CV_LOG_DEBUG(NULL, "VIDEOIO: choosen backend does not work or wrong. " + CV_LOG_DEBUG(NULL, "VIDEOIO: chosen backend does not work or wrong. " "Please make sure that your computer support chosen backend and OpenCV built " "with right flags."); } @@ -494,7 +494,7 @@ bool VideoCapture::open(int cameraNum, int apiPreference, const std::vector } else { - CV_LOG_DEBUG(NULL, "VIDEOIO: choosen backend does not work or wrong." + CV_LOG_DEBUG(NULL, "VIDEOIO: chosen backend does not work or wrong." "Please make sure that your computer support chosen backend and OpenCV built " "with right flags."); } @@ -811,7 +811,7 @@ bool VideoWriter::open(const String& filename, int apiPreference, int fourcc, do } else { - CV_LOG_DEBUG(NULL, "VIDEOIO: choosen backend does not work or wrong." + CV_LOG_DEBUG(NULL, "VIDEOIO: chosen backend does not work or wrong." "Please make sure that your computer support chosen backend and OpenCV built " "with right flags."); }