我又看了一下,的确这个接口被封掉了,文档却没有同步。确实没有了。
你用IsBlank来判断是不是空白页。另外还有个demo对你有参考价值:
- public void BlankPageDetectorCommandExample()
- {
- // Load an image
- RasterCodecs codecs = new RasterCodecs();
- codecs.ThrowExceptionsOnInvalidImages = true;
- RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Clean.tif"));
- // Prepare the command
- BlankPageDetectorCommand command = new BlankPageDetectorCommand();
- //Determine whether the image is a blank page
- command.Flags = BlankPageDetectorCommandFlags.DetectNoisyPage;
- command.Run(image);
- MessageBox.Show(" Is Blank : " + command.IsBlank + "\n Accuracy : " + (command.Accuracy * 1.0 / 100) + "%", "Blank Page Detection Results");
- }
复制代码 |