ImageCapture QML Type

카메라 이미지 캡처를 위한 인터페이스입니다. 더 보기...

Import Statement: import QtMultimedia

속성

신호

방법

상세 설명

이 유형을 사용하면 정지 이미지를 캡처하고 사용 가능하거나 디스크에 저장될 때 알림을 받을 수 있습니다.

Item {
    width: 640
    height: 360

    CaptureSession {
        imageCapture : ImageCapture {
            id: imageCapture
        }
        camera: Camera {
            id: camera
        }

        videoOutput: videoOutput
    }
    VideoOutput {
        id: videoOutput
        anchors.fill: parent

        MouseArea {
            anchors.fill: parent;
            onClicked: imageCapture.capture();
        }
    }

    Image {
        id: photoPreview
        source: imageCapture.preview // always shows the last captured image
    }
}

속성 문서

preview : string [read-only]

이 속성에는 가장 최근에 캡처한 이미지의 URL이 저장됩니다. Image 요소의 소스 속성에 연결하여 마지막으로 캡처한 이미지를 표시할 수 있습니다.

CaptureSession {
    camera: Camera {}
    imageCapture: ImageCapture {
        id: capture
    }
}
Image {
    source: capture.preview
}

saveToFile참조하세요 .


readyForCapture : bool [read-only]

이 속성에는 카메라가 사진을 캡처할 준비가 되었는지 여부를 나타내는 부울 값이 들어 있습니다.

준비 상태가 false 인 상태에서 capture() 또는 captureToFile()을 호출하면 허용되지 않으며 오류가 발생합니다.


신호 문서

errorOccurred(id, error, errorString)

이 신호는 요청된 id 으로 캡처하는 동안 오류가 발생할 때 발생합니다. error 은 ImageCapture::Error 유형의 열거입니다. 설명 메시지는 errorString 에서 확인할 수 있습니다.

참고: 해당 핸들러는 onErrorOccurred 입니다.


imageCaptured(requestId, preview)

이 신호는 요청된 ID가 requestId 인 이미지가 캡처되었지만 아직 파일 시스템에 저장되지 않은 경우에 발생합니다. preview 매개변수는 캡처된 이미지입니다.

참고: 해당 핸들러는 onImageCaptured 입니다.

imageSavedpreview도 참조하세요 .


imageMetadataAvailable(id, metaData)

이 신호는 요청된 id 이미지에 새로운 metaData 이 있을 때 발생합니다.

참고: 해당 핸들러는 onImageMetadataAvailable 입니다.

imageCaptured도 참조하십시오 .


imageSaved(id, fileName)

이 신호는 요청된 id 이미지가 파일 시스템에 기록된 후에 발생합니다. fileName 은 URL이 아닌 로컬 파일 경로입니다.

참고: 해당 핸들러는 onImageSaved 입니다.

imageCaptured도 참조하세요 .


메서드 문서

capture()

이미지 캡처를 시작합니다. 캡처가 완료되면 imageCapturedimageSaved 신호가 전송됩니다.

캡처된 이미지는 QML 이미지 항목의 소스로 사용할 수 있는 미리보기 속성을 통해 사용할 수 있습니다. 그런 다음 saveToFile() 메서드를 사용하여 이미지를 저장할 수 있습니다.

카메라는 노출 설정이나 이미지 처리 매개변수와 같은 모든 캡처 매개변수를 저장하므로 capture() 호출 후 카메라 매개변수를 변경해도 이전 캡처 요청에는 영향을 미치지 않습니다.

capture()는 imageExposed(), imageCaptured(), imageMetadataAvailable() 및 imageSaved() 신호와 함께 사용되는 capture requestId 매개변수를 반환합니다.

readyForCapturepreview참조하세요 .


captureToFile(location)

capture()와 동일한 작업을 수행하지만 추가로 캡처된 이미지를 지정된 location 에 자동으로 저장합니다.

capture도 참조하세요 .


saveToFile(location)

마지막으로 캡처한 이미지를 location 에 저장합니다.

capturepreview도 참조 하세요.


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.