Location:
Search - imagescanner
Search list
Description: 一个C#写的图像扫描的程序,功能虽然简单,但有一定的参考价值-A c# program for image scan with simple function and good reference value.
Platform: |
Size: 18432 |
Author: 楂樻攢 |
Hits:
Description: Image primaryImage = Image.FromFile(fileName);
Bitmap pImg = MakeGrayscale3((Bitmap)primaryImage);
using (ZBar.ImageScanner scanner = new ZBar.ImageScanner())
{
List<ZBar.Symbol> symbols = new List<ZBar.Symbol>();
System.Diagnostics.Stopwatch watch = new Stopwatch();
watch.Start();
symbols = scanner.Scan((Image)pImg);
watch.Stop();
TimeSpan timeSpan = watch.Elapsed;
MessageBox.Show("扫描执行时间:" + timeSpan.TotalMilliseconds.ToString());
if (symbols != null && symbols.Count > 0)
{
string result = string.Empty;
symbols.ForEach(s => result += "条码内容:" + s.Data + " 条码质量:" + s.Type + Environment.NewLine);
MessageBox.Show(result);
}
}(This is the code that c# identifies with ZBar, which I use to automatically generate Baidu translation just to download the code on the site)
Platform: |
Size: 2695168 |
Author: jackwang1211 |
Hits: