我有一个kivy应用程序,我想让相机组件填满整个屏幕作为背景。这是我目前得到的:
<CamBoxLayout>:
orientation: "vertical"
display: entry
padding: 10
spacing: 10
BoxLayout:
size_hint: 1, 1
id: entry
multiline: False
Camera:
center: self.size and entry.center
size: entry.height, entry.width
canvas.before:
PushMatrix:
Rotate:
angle: 90
origin: self.center
canvas.after:
PopMatrix:
allow_stretch: True
resolution: (720, 1080)
play: True
但相机只是填充了部分屏幕,它隐藏在任何按钮后面,所以这很好。 谢谢,Ed。
答案 0 :(得分:0)
我在这里也遇到了同样的问题,但在葡萄牙语版本的堆栈溢出中,我仍然发布了一个像您一样的问题。下面的代码对我有用,请尝试:
Camera:
resolution: (self.width, self.height)
它会返回一些错误,例如书面的波纹管,但视频看起来很完美:
[ WARN:0] videoio(MSMF): OnReadSample() is called with error status: -1072873821
[ WARN:0] videoio(MSMF): async ReadSample() call is failed with error status: -1072873821
[ WARN:1] videoio(MSMF): OnReadSample() is called with error status: -1072873821
[ WARN:1] videoio(MSMF): async ReadSample() call is failed with error status: -1072873821
我仍然不知道这些错误是否令人担忧...