说明:主要步骤
1.生成普通python数组(bytearray(),os.urandom())
2.转换成numpy数组(numpy.array())
3.通过reshape将数组转换到所需的维数
4.以图像的形式显示出来(cv.imshow())
代码
import os
import cv2 as cv
import numpy as np
# Make an array of 120000 random bytes
randomByteArray = bytearray(os.urandom <weixin_38720256> 上传 | 大小:147kb
说明:1.使用usb口输入的扫描枪,这里实现使用了winform
首先创建一个CS文件
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
namespace am_sign
{
class BardCodeHooK
{
public delegat <weixin_38508126> 上传 | 大小:55kb