弄了n天,不是这里报错,就是那里报错。最后终于用了一个一劳永逸的方法。备忘下关键点。
Linux系统:unbuntu 14.04
opencv:3.4.1
关键就是一开始cmake配置target的时候需要写Linux。若写arm-linux。with_V4L选择项是看不到的。这样的话就算编译成功烧录到开发板,无法访问摄像头。只能用opencv处理图片而已。
第二个问题是编译会出现zlib.h找不到呀。xxx未定义呀。主要原因是一开始配置target的时候最后右下角include头文件路径要选择only target。然后就可以一路顺利啦~
root@beaglebone:/home/cl# ./showpic
go 1
go 2
go 3
width = 176.00
height = 144.00
fbs = 30.00
brightness = 0.30
contrast = 0.57
saturation = 0.50
hue = -1.00
exposure = -1.00
width = 176.00
width = 176.00
width = 176.00
width = 176.00
width = 176.00
width = 176.00
网友评论