Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Pixel subtraction on a video : how to get a serie of images ?

Pixel subtraction on a video : how to get a serie of images ?

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 639 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kmedghaith
    wrote on last edited by
    #1

    Hi all,
    I have some issues to make some post-processing on a video. Just to start, I would like to make a simple pixel subtraction on a video, my code looks like the following :
    @
    Column {
    width: parent.width/2
    height: parent.height

            property int itemsCount : 4
            property int itemsHeight: height /itemsCount
    
            VideoOutput {
                width: parent.width
                height: parent.itemsHeight
                id : video
                source: player
            }
    
            ShaderEffect {
                width: parent.width
                height: parent.itemsHeight
                id : image1
                property variant source: ShaderEffectSource {
                    sourceItem: video;
                }
                fragmentShader: shadersFactory.simpleShader
            }
    
            ShaderEffect {
                width: parent.width
                height: parent.itemsHeight
                id : image2
                property variant source: ShaderEffectSource {
                    sourceItem: image1;
                }
                fragmentShader: shadersFactory.simpleShader
            }
    
            ShaderEffect {
                width: parent.width
                height: parent.itemsHeight
                id : image3
                property variant oldSource: ShaderEffectSource {
    

    sourceItem: image2;}
    property variant newSource: ShaderEffectSource {
    sourceItem: image1;}
    fragmentShader: shadersFactory.soustracionShader
    }
    }
    @

    but I'm realizing that image1 and image2 are the same.

    Someone knows how to get images serie from a video and put them in shaders as textures ?
    Thanks in advance.

    MG.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved