From 0bc95d9256961c5e8be1fe383951b960a75e104c Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Wed, 21 May 2025 11:13:50 +0200 Subject: [PATCH] Merge pull request #27338 from omahs:patch-1 Fix typos #27338 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake --- apps/visualisation/opencv_visualisation.cpp | 10 +++++----- doc/tutorials/dnn/dnn_yolo/dnn_yolo.markdown | 2 +- hal/carotene/include/carotene/functions.hpp | 2 +- hal/openvx/include/ivx.hpp | 2 +- modules/calib3d/src/usac.hpp | 2 +- modules/calib3d/test/test_fisheye.cpp | 2 +- modules/dnn/src/layers/recurrent_layers.cpp | 2 +- modules/dnn/src/tensorflow/tf_importer.cpp | 2 +- modules/imgcodecs/src/grfmt_jpeg2000_openjpeg.cpp | 2 +- modules/imgproc/test/test_drawing.cpp | 4 ++-- modules/ml/include/opencv2/ml.hpp | 2 +- modules/ml/src/gbt.cpp | 2 +- modules/videoio/src/cap_gstreamer.cpp | 2 +- modules/videoio/src/cap_v4l.cpp | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/apps/visualisation/opencv_visualisation.cpp b/apps/visualisation/opencv_visualisation.cpp index 9b7fcd9f48..35b7bf53fc 100644 --- a/apps/visualisation/opencv_visualisation.cpp +++ b/apps/visualisation/opencv_visualisation.cpp @@ -113,7 +113,7 @@ int main( int argc, const char** argv ) int timing = 1; // Value for cols of storing elements - int cols_prefered = 5; + int cols_preferred = 5; // Open the XML model FileStorage fs; @@ -218,7 +218,7 @@ int main( int argc, const char** argv ) for(int sid = 0; sid < (int)stage_features.size(); sid ++){ if(draw_planes){ int features_nmbr = (int)stage_features[sid].size(); - int cols = cols_prefered; + int cols = cols_preferred; int rows = features_nmbr / cols; if( (features_nmbr % cols) > 0){ rows++; @@ -257,7 +257,7 @@ int main( int argc, const char** argv ) result_video.write(temp_window); // Copy the feature image if needed if(draw_planes){ - single_feature.copyTo(image_plane(Rect(0 + (fid%cols_prefered)*single_feature.cols, 0 + (fid/cols_prefered) * single_feature.rows, single_feature.cols, single_feature.rows))); + single_feature.copyTo(image_plane(Rect(0 + (fid%cols_preferred)*single_feature.cols, 0 + (fid/cols_preferred) * single_feature.rows, single_feature.cols, single_feature.rows))); } putText(temp_metadata, meta1.str(), Point(15,15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255)); putText(temp_metadata, meta2.str(), Point(15,40), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255)); @@ -291,7 +291,7 @@ int main( int argc, const char** argv ) for(int sid = 0; sid < (int)stage_features.size(); sid ++){ if(draw_planes){ int features_nmbr = (int)stage_features[sid].size(); - int cols = cols_prefered; + int cols = cols_preferred; int rows = features_nmbr / cols; if( (features_nmbr % cols) > 0){ rows++; @@ -353,7 +353,7 @@ int main( int argc, const char** argv ) // Bottom right rectangle(single_feature, Rect(resized_inner.x + 2*resized_inner.width, resized_inner.y + 2*resized_inner.height, resized_inner.width, resized_inner.height), Scalar(255), 1); - single_feature.copyTo(image_plane(Rect(0 + (fid%cols_prefered)*single_feature.cols, 0 + (fid/cols_prefered) * single_feature.rows, single_feature.cols, single_feature.rows))); + single_feature.copyTo(image_plane(Rect(0 + (fid%cols_preferred)*single_feature.cols, 0 + (fid/cols_preferred) * single_feature.rows, single_feature.cols, single_feature.rows))); } putText(temp_metadata, meta1.str(), Point(15,15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255)); diff --git a/doc/tutorials/dnn/dnn_yolo/dnn_yolo.markdown b/doc/tutorials/dnn/dnn_yolo/dnn_yolo.markdown index 8406b4746c..9df97d7370 100644 --- a/doc/tutorials/dnn/dnn_yolo/dnn_yolo.markdown +++ b/doc/tutorials/dnn/dnn_yolo/dnn_yolo.markdown @@ -41,7 +41,7 @@ Assuming that we have successfully trained YOLOX model, the subsequent step invo running this model with OpenCV. There are several critical considerations to address before proceeding with this process. Let's delve into these aspects. -### YOLO's Pre-proccessing & Output +### YOLO's Pre-processing & Output Understanding the nature of inputs and outputs associated with YOLO family detectors is pivotal. These detectors, akin to most Deep Neural Networks (DNN), typically exhibit variation in input diff --git a/hal/carotene/include/carotene/functions.hpp b/hal/carotene/include/carotene/functions.hpp index 06f1adf3b3..15a12e765b 100644 --- a/hal/carotene/include/carotene/functions.hpp +++ b/hal/carotene/include/carotene/functions.hpp @@ -1040,7 +1040,7 @@ namespace CAROTENE_NS { s32 maxVal, size_t * maxLocPtr, s32 & maxLocCount, s32 maxLocCapacity); /* - Among each pixel `p` within `src` find min and max values and its first occurences + Among each pixel `p` within `src` find min and max values and its first occurrences */ void minMaxLoc(const Size2D &size, const s8 * srcBase, ptrdiff_t srcStride, diff --git a/hal/openvx/include/ivx.hpp b/hal/openvx/include/ivx.hpp index 5e63d1bb24..d4d520a18a 100644 --- a/hal/openvx/include/ivx.hpp +++ b/hal/openvx/include/ivx.hpp @@ -1535,7 +1535,7 @@ public: return prevPtr; } - /// vxSwapImageHandle() wrapper for the case when no new pointers provided and previous ones are not needed (retrive memory back) + /// vxSwapImageHandle() wrapper for the case when no new pointers provided and previous ones are not needed (retrieve memory back) void swapHandle() { IVX_CHECK_STATUS( vxSwapImageHandle(ref, 0, 0, 0) ); } diff --git a/modules/calib3d/src/usac.hpp b/modules/calib3d/src/usac.hpp index 9b66a4576f..33de40c46d 100644 --- a/modules/calib3d/src/usac.hpp +++ b/modules/calib3d/src/usac.hpp @@ -17,7 +17,7 @@ class Error : public Algorithm { public: // set model to use getError() function virtual void setModelParameters (const Mat &model) = 0; - // returns error of point wih @point_idx w.r.t. model + // returns error of point with @point_idx w.r.t. model virtual float getError (int point_idx) const = 0; virtual const std::vector &getErrors (const Mat &model) = 0; }; diff --git a/modules/calib3d/test/test_fisheye.cpp b/modules/calib3d/test/test_fisheye.cpp index f3d2ea58da..2774ea19ba 100644 --- a/modules/calib3d/test/test_fisheye.cpp +++ b/modules/calib3d/test/test_fisheye.cpp @@ -640,7 +640,7 @@ TEST_F(fisheyeTest, CalibrationWithFixedFocalLength) cv::fisheye::calibrate(objectPoints, imagePoints, imageSize, theK, theD, cv::noArray(), cv::noArray(), flag, cv::TermCriteria(3, 20, 1e-6)); - // ensure that CALIB_FIX_FOCAL_LENGTH works and focal lenght has not changed + // ensure that CALIB_FIX_FOCAL_LENGTH works and focal length has not changed EXPECT_EQ(theK(0,0), K(0,0)); EXPECT_EQ(theK(1,1), K(1,1)); diff --git a/modules/dnn/src/layers/recurrent_layers.cpp b/modules/dnn/src/layers/recurrent_layers.cpp index 7448511816..ad45a8a2a9 100644 --- a/modules/dnn/src/layers/recurrent_layers.cpp +++ b/modules/dnn/src/layers/recurrent_layers.cpp @@ -405,7 +405,7 @@ public: //swap axis 0 and 1 input x cv::Mat tmp; // Since python input is 4 dimentional and C++ input 3 dimentinal - // we need to proccess each differently + // we need to process each differently if (input[0].dims == 4){ // here !!! CV_Assert(input[0].size[3] == 1); diff --git a/modules/dnn/src/tensorflow/tf_importer.cpp b/modules/dnn/src/tensorflow/tf_importer.cpp index 8ae651bc73..b000b2a71b 100644 --- a/modules/dnn/src/tensorflow/tf_importer.cpp +++ b/modules/dnn/src/tensorflow/tf_importer.cpp @@ -2645,7 +2645,7 @@ void TFImporter::parsePReLU(tensorflow::GraphDef& net, const tensorflow::NodeDef layerParams.blobs.resize(1); if (scales.dims == 3) { - // Considering scales from Keras wih HWC layout; + // Considering scales from Keras with HWC layout; transposeND(scales, {2, 0, 1}, layerParams.blobs[0]); } else { layerParams.blobs[0] = scales; diff --git a/modules/imgcodecs/src/grfmt_jpeg2000_openjpeg.cpp b/modules/imgcodecs/src/grfmt_jpeg2000_openjpeg.cpp index c05c0bca0e..70832277ef 100644 --- a/modules/imgcodecs/src/grfmt_jpeg2000_openjpeg.cpp +++ b/modules/imgcodecs/src/grfmt_jpeg2000_openjpeg.cpp @@ -146,7 +146,7 @@ public: return (ptr_ - other.ptr_) / step_; } - /* Comparision */ + /* Comparison */ bool operator==(const ChannelsIterator& other) const CV_NOEXCEPT { return ptr_ == other.ptr_; diff --git a/modules/imgproc/test/test_drawing.cpp b/modules/imgproc/test/test_drawing.cpp index 8496d6e6b7..80e01794a1 100644 --- a/modules/imgproc/test/test_drawing.cpp +++ b/modules/imgproc/test/test_drawing.cpp @@ -789,7 +789,7 @@ TEST(Drawing, fillpoly_fully) cv::Mat labelImage(binary.size(), CV_32S); cv::Mat labelCentroids; int labels = cv::connectedComponents(binary, labelImage, 4); - EXPECT_EQ(2, labels) << "artifacts occured"; + EXPECT_EQ(2, labels) << "artifacts occurred"; } // check if filling went over border @@ -878,7 +878,7 @@ PARAM_TEST_CASE(FillPolyFully, unsigned, unsigned, int, int, Point, cv::LineType cv::Mat labelImage(binary.size(), CV_32S); cv::Mat labelCentroids; int labels = cv::connectedComponents(binary, labelImage, 4); - EXPECT_EQ(2, labels) << "artifacts occured"; + EXPECT_EQ(2, labels) << "artifacts occurred"; } void check_filling_over_border(cv::Mat& img, const std::vector& polygonPoints) diff --git a/modules/ml/include/opencv2/ml.hpp b/modules/ml/include/opencv2/ml.hpp index d537ab7759..b66a300402 100644 --- a/modules/ml/include/opencv2/ml.hpp +++ b/modules/ml/include/opencv2/ml.hpp @@ -256,7 +256,7 @@ public: @param filename The input file name @param headerLineCount The number of lines in the beginning to skip; besides the header, the - function also skips empty lines and lines staring with `#` + function also skips empty lines and lines starting with `#` @param responseStartIdx Index of the first output variable. If -1, the function considers the last variable as the response @param responseEndIdx Index of the last output variable + 1. If -1, then there is single diff --git a/modules/ml/src/gbt.cpp b/modules/ml/src/gbt.cpp index d1d6f2c8ea..842c1ba459 100644 --- a/modules/ml/src/gbt.cpp +++ b/modules/ml/src/gbt.cpp @@ -256,7 +256,7 @@ CvGBTrees::train( const CvMat* _train_data, int _tflag, // inside gbt learning process only regression decision trees are built data->is_classifier = false; - // preproccessing sample indices + // preprocessing sample indices if (_sample_idx) { int sample_idx_len = get_len(_sample_idx); diff --git a/modules/videoio/src/cap_gstreamer.cpp b/modules/videoio/src/cap_gstreamer.cpp index e4a325041c..a158119d3f 100644 --- a/modules/videoio/src/cap_gstreamer.cpp +++ b/modules/videoio/src/cap_gstreamer.cpp @@ -1162,7 +1162,7 @@ bool GStreamerCapture::retrieveFrame(int index, OutputArray dst) } } - CV_LOG_ERROR(NULL, "GStreamer(retrive): unrecognized index=" << index); + CV_LOG_ERROR(NULL, "GStreamer(retrieve): unrecognized index=" << index); return false; } diff --git a/modules/videoio/src/cap_v4l.cpp b/modules/videoio/src/cap_v4l.cpp index 5575b099e2..9450f85f5a 100644 --- a/modules/videoio/src/cap_v4l.cpp +++ b/modules/videoio/src/cap_v4l.cpp @@ -440,7 +440,7 @@ struct CvCaptureCAM_V4L CV_FINAL : public IVideoCapture bool convertableToRgb() const; void convertToRgb(const Buffer ¤tBuffer); - bool havePendingFrame; // true if next .grab() should be noop, .retrive() resets this flag + bool havePendingFrame; // true if next .grab() should be noop, .retrieve() resets this flag }; /*********************** Implementations ***************************************/