PaddleSharp icon indicating copy to clipboard operation
PaddleSharp copied to clipboard

OpenCvSharp.Mat.FromPixelData not found

Open nguyenthaohut opened this issue 6 months ago • 1 comments

Describe the bug

---------------2025/07/30 17:07:34--------------- Error: Method not found: 'OpenCvSharp.Mat OpenCvSharp.Mat.FromPixelData(Int32, Int32, OpenCvSharp.MatType, IntPtr, Int64)'. at Sdcb.PaddleOCR.PaddleOcrRecognizer.ExtractMat(Mat[] srcs, Int32 channel, Int32 height, Int32 width) at Sdcb.PaddleOCR.PaddleOcrRecognizer.RunMulti(Mat[] srcs) at Sdcb.PaddleOCR.PaddleOcrRecognizer.<Run>b__9_2(ValueTuple2[] x) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__172.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable1.<GetEnumerator>d__1.MoveNext() at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Sdcb.PaddleOCR.PaddleOcrRecognizer.Run(Mat[] srcs, Int32 batchSize) at SSGVisionLib.VisionMain.OCRClass.ReadPath(String filename) in E:\1.Canhan\1.Vision\7.OCR\SSGVisionLib\VisionMain\OCRClass.cs:line 25 at SSGVisionTestApp.OCR_Form.btDetect_Click(Object sender, EventArgs e) in E:\1.Canhan\1.Vision\7.OCR\SSGVisionTestApp\OCR_Form.cs:line 184

Steps to reproduce the bug

public string ReadPath(string filename) { Mat[] matt = new Mat[1]; matt[0] = new Mat(filename); return _ModelOCR.Run(matt)[0].Text; }

Expected behavior

No response

Screenshots

No response

Release version

No response

IDE

No response

OS version

No response

Additional context

No response

nguyenthaohut avatar Jul 30 '25 10:07 nguyenthaohut

use latest version of opencvsharp4

sdcb avatar Jul 30 '25 10:07 sdcb