From 8e241688d0c9d4078530cae95f37e4020d2959d6 Mon Sep 17 00:00:00 2001 From: yuan dian Date: Sat, 28 Feb 2026 16:16:31 +0800 Subject: [PATCH] Clean Chinese/garbled characters in docs and comments --- docs/Platform_compile_guide.md | 156 ++++++++++++------------- examples/ppocr-det/cpp/src/clipper.cpp | 12 +- examples/yolov8/README.md | 2 +- 3 files changed, 86 insertions(+), 84 deletions(-) diff --git a/docs/Platform_compile_guide.md b/docs/Platform_compile_guide.md index 41433c4..e5c92c1 100755 --- a/docs/Platform_compile_guide.md +++ b/docs/Platform_compile_guide.md @@ -1,79 +1,79 @@ - - -# 1、Android Platform - -​ **Android compilation** depends on the NDK toolchain. Currently, version r25c is recommended. Download link: https://github.com/android/ndk/wiki/Unsupported-Downloads - -## NDK toolchain configuration - -- Verify whether the ndk-build compilation environment exists: - -​ Execute: ndk-build -v. If there is a version information prompt, it is successful. If not, refer to the following steps to configure the ndk-build compilation environment - -- Download android-ndk-r25c - - ​ https://dl.google.com/android/repository/android-ndk-r25c-linux.zip - -- Unzip and get the path /xxxx/android-ndk-r25c - -- Set environment variables - - - Edit bash.bashrc file - - ​ sudo vi ~/.bashrc - - ​ Add at the end of the file: export PATH=/xxxx/android-ndk-r25c:$PATH - - - Update environment variables - - ​ source ~/.bashrc - - - Check whether the environment has been successfully added - - ​ ndk-build --version shows version information - - - -# 2、Linux Platform - - **Linux compilation** toolchain dependency: **gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf**, download link: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/ - -## Linux toolchain configuration: - -1. Configure the cmake compilation environment: - - 1. Verify whether there is a cmake environment: - - cmake --version shows the cmake version is successful. If cmake does not exist, perform the following steps to configure the cmake environment - - 2. Install cmake - - pip3 install cmake==3.16.3 - - 3. Verify that the installation is successful - - cmake --version - - Displaying the cmake version is successful - - - -2. Configure the compilation toolchain - 1. Download the toolchain - 32-bit:https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/ link, - gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf.tar.xz - -​ 64-bit: There is currently no 64-bit version, and it will not be added for the time being. If some customers use the corresponding version and did not add the toolchain path in time, please give feedback. - - 2.arm-none-linux-gnueabihf install - -​ a.Unzip it and place it in the folder you need -​ tar -xvJf ***.tar.xz -​ b.Edit the bash.bashrc file -​ sudo vi ~/.bashrc -​ c.Add environment variables -​ export PATH=path_to/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin:$PATH -​ d.update environment variables -​ source ~/.bashrc -​ e.Check if the environment is successfully joined + + +# 1 Android Platform + +​ **Android compilation** depends on the NDK toolchain. Currently, version r25c is recommended. Download link: https://github.com/android/ndk/wiki/Unsupported-Downloads + +## NDK toolchain configuration + +- Verify whether the ndk-build compilation environment exists: + +​ Execute: ndk-build -v. If there is a version information prompt, it is successful. If not, refer to the following steps to configure the ndk-build compilation environment + +- Download android-ndk-r25c + + ​ https://dl.google.com/android/repository/android-ndk-r25c-linux.zip + +- Unzip and get the path /xxxx/android-ndk-r25c + +- Set environment variables + + - Edit bash.bashrc file + + ​ sudo vi ~/.bashrc + + ​ Add at the end of the file: export PATH=/xxxx/android-ndk-r25c:$PATH + + - Update environment variables + + ​ source ~/.bashrc + + - Check whether the environment has been successfully added + + ​ ndk-build --version shows version information + + + +# 2 Linux Platform + + **Linux compilation** toolchain dependency: **gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf**, download link: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/ + +## Linux toolchain configuration: + +1. Configure the cmake compilation environment: + + 1. Verify whether there is a cmake environment: + + cmake --version shows the cmake version is successful. If cmake does not exist, perform the following steps to configure the cmake environment + + 2. Install cmake + + pip3 install cmake==3.16.3 + + 3. Verify that the installation is successful + + cmake --version + + Displaying the cmake version is successful + + + +2. Configure the compilation toolchain + 1. Download the toolchain + 32-bit:https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/ link, + gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf.tar.xz + +​ 64-bit: There is currently no 64-bit version, and it will not be added for the time being. If some customers use the corresponding version and did not add the toolchain path in time, please give feedback. + + 2.arm-none-linux-gnueabihf install + +​ a.Unzip it and place it in the folder you need +​ tar -xvJf ***.tar.xz +​ b.Edit the bash.bashrc file +​ sudo vi ~/.bashrc +​ c.Add environment variables +​ export PATH=path_to/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin:$PATH +​ d.update environment variables +​ source ~/.bashrc +​ e.Check if the environment is successfully joined ​ Execue:arm-none-linux-gnueabihf-gcc -v,View gcc 32bit version \ No newline at end of file diff --git a/examples/ppocr-det/cpp/src/clipper.cpp b/examples/ppocr-det/cpp/src/clipper.cpp index 947ef1b..ed3ec9b 100755 --- a/examples/ppocr-det/cpp/src/clipper.cpp +++ b/examples/ppocr-det/cpp/src/clipper.cpp @@ -4108,10 +4108,12 @@ inline double DistanceSqrd(const IntPoint &pt1, const IntPoint &pt2) { double DistanceFromLineSqrd(const IntPoint &pt, const IntPoint &ln1, const IntPoint &ln2) { - // The equation of a line in general form (Ax + By + C = 0) - // given 2 points (x锟?y锟? & (x锟?y锟? is ... - //(y锟?- y锟?x + (x锟?- x锟?y + (y锟?- y锟?x锟?- (x锟?- x锟?y锟?= 0 - // A = (y锟?- y锟?; B = (x锟?- x锟?; C = (y锟?- y锟?x锟?- (x锟?- x锟?y锟? // perpendicular distance of point (x锟?y锟? = (Ax锟?+ By锟?+ C)/Sqrt(A锟?+ B锟? + // The equation of a line in general form is Ax + By + C = 0. + // Given two points (x1, y1) and (x2, y2): + // (y1 - y2)x + (x2 - x1)y + (y2x1 - x2y1) = 0 + // so A = (y1 - y2), B = (x2 - x1), C = (y2x1 - x2y1). + // The perpendicular distance of point (x, y) is + // (Ax + By + C) / sqrt(A^2 + B^2). // see http://en.wikipedia.org/wiki/Perpendicular_distance double A = double(ln1.Y - ln2.Y); double B = double(ln2.X - ln1.X); @@ -4376,4 +4378,4 @@ std::ostream &operator<<(std::ostream &s, const Paths &p) { } //------------------------------------------------------------------------------ -} // ClipperLib namespace \ No newline at end of file +} // ClipperLib namespace diff --git a/examples/yolov8/README.md b/examples/yolov8/README.md index e22da13..f000f74 100644 --- a/examples/yolov8/README.md +++ b/examples/yolov8/README.md @@ -60,7 +60,7 @@ example | ----------------- | ------------------------------------------------------------ | | model_path | onnx model path | | adla_toolkit_path | path to adla_toolkit | -| target_platform | Specify target platform. for A311D2 : PRODUCT_PID0XA003。for S905X5: PRODUCT_PID0XA005 | +| target_platform | Specify target platform. For A311D2: PRODUCT_PID0XA003. For S905X5: PRODUCT_PID0XA005 |