[Interest] Rendering 3d object on webcam video

Alex john blackbriar153 at gmail.com
Wed Mar 3 15:28:20 CET 2021


Hello,

I am trying  to overlay a 3d object(.obj file) on top of the video, I could
successfully load the .obj file and rendered it by refering to example
https://doc.qt.io/qt-5/qt3d-wireframe-example.html, later I changed the
code in main.qml by raping Entity from main.qml into Scene3D and tried to
get the webcam rendered using QtMultimedia as below.

Rectangle{

Scene3D{
            anchors.fill: parent
            focus: true

  Entity {
                id: root

                // Render  3d object same code as in
https://doc.qt.io/qt-5/qt3d-wireframe-example.html

         }


}
 Camera {
            id: camera
            imageProcessing.whiteBalanceMode:
CameraImageProcessing.WhiteBalanceFlash
            exposure {
                exposureCompensation: -1.0
                exposureMode: Camera.ExposurePortrait
            }

            flash.mode: Camera.FlashRedEyeReduction


        }

        VideoOutput {
            source: camera
            anchors.fill: parent
            //focus : visible // to receive focus and capture key events
when visible
        }

}

However, what happens is either the camera video is seen or the 3d object
based on the sequence whichever is last. How can I get the 3D object on top
of the video? any clues?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210303/effbf8a2/attachment.html>


More information about the Interest mailing list