[Interest] Camera.focus.focusZones.length is 0?
Jason H
jhihn at gmx.com
Tue Apr 14 18:44:33 CEST 2015
I am trying to get more reliable (read: in-focus) images. It seems that Camera.searchAndLock() is not enough, for various reasons that I won't go into. I am approaching this problem from multiple angles. I now include accelerometer data to reduce motion blur (our subjects are still) and I went to make sure the camera thought it was in focus. I even copied the example (included below) from the docs which shows the focus rects, but none are shown. I'm using
Camera {
id: camera
focus.focusMode: Camera.FocusContinuous
focus.focusPointMode: Camera.FocusPointCenter
}
I would figure there would be at least one focus zone. So how can I tell if the camera thinks it is a focus?
// Example from docs
VideoOutput {
anchors.fill: parent
autoOrientation: true
source: camera
Repeater {
model: camera.focus.focusZones
Rectangle {
border {
width: 2
color: status == Camera.FocusAreaFocused ? "green" : "white"
}
color: "transparent"
// Map from the relative, normalized frame coordinates
property variant mappedRect: viewfinder.mapNormalizedRectToItem(area);
x: mappedRect.x
y: mappedRect.y
width: mappedRect.width
height: mappedRect.height
}
}
}
Many thanks in advance!
More information about the Interest
mailing list