Skip to content

Commit

Permalink
Merge branch 'master' of github.com:sdcb/PaddleSharp
Browse files Browse the repository at this point in the history
  • Loading branch information
sdcb committed Jan 4, 2022
2 parents db3664a + b5cecb5 commit d2dc2f7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PaddleSharp [![QQ](https://img.shields.io/badge/QQ_Group-579060605-52B6EF?style=social&logo=tencent-qq&logoColor=000&logoWidth=20)](https://jq.qq.com/?_wv=1027&k=K4fBqpyQ)

💗.NET Wrapper for `PaddleInference` C API, include `PaddleOCR`, support 14 languages model download on-demand, support **Windows**(x64) and **Linux**(Ubuntu-20.04 x64).
💗.NET Wrapper for `PaddleInference` C API, include `PaddleOCR`, support 14 OCR languages model download on-demand, support **Windows**(x64) and **Linux**(Ubuntu-20.04 x64).

## NuGet Packages/Docker Images

Expand Down Expand Up @@ -45,7 +45,11 @@ using (HttpClient http = new HttpClient())
sampleImageData = await http.GetByteArrayAsync(sampleImageUrl);
}

using (PaddleOcrAll all = new PaddleOcrAll(model.RootDirectory, model.KeyPath))
using (PaddleOcrAll all = new PaddleOcrAll(model.RootDirectory, model.KeyPath)
{
AllowRotateDetection = true, /* 允许识别有角度的文字 */
Enable180Classification = false, /* 允许识别旋转角度大于90度的文字 */
})
{
// Load local file by following code:
// using (Mat src2 = Cv2.ImRead(@"C:\test.jpg"))
Expand Down Expand Up @@ -119,6 +123,7 @@ using (Mat src = Cv2.ImDecode(sampleImageData, ImreadModes.Color))
using (Mat visualized = PaddleOcrDetector.Visualize(src, rects, Scalar.Red, thickness: 2))
{
string outputFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "output.jpg");
Console.WriteLine("OutputFile: " + outputFile);
visualized.ImWrite(outputFile);
}
}
Expand Down

0 comments on commit d2dc2f7

Please sign in to comment.