Menu

Fast RGB Adjust in Video Stream

Anonymous
2013-01-08
2013-01-09
  • Anonymous

    Anonymous - 2013-01-08

    What would you suggest as an effective strategy to do fast RGB color adjust real time to a streamed video frame? Conceptually I'm looking to acheive a real time effect much like your CannyEdgeDetector example in a tutorial, except I want my end users to move green, blue and red sliders as video is streaming and see effects of those changes immediately real time. The filters I have from jhlabs work fine but they are too slow for that.

    Adam

     
  • David Dupplaw

    David Dupplaw - 2013-01-08

    Well, the channels are all stored separately in an MBFImage. So, add a VideoDisplayListener and in the beforeUpdate() method do a frame.getBand(n).multiplyInplace( sliderValue ) where slider value is between 0 and 1. That should do it. Don't know how fast it would be.

     

    Last edit: David Dupplaw 2013-01-08
  • mrazjava

    mrazjava - 2013-01-09

    Yep, I got that working exactly as you suggest with modifying individual bands. Works like a charm and is fast, too! Funny how solution comes after posting a question.

    Also, the JIRA ticket I opened about slow CannyEdgeDetector - while still a valid question (not a bug), I found a work around. I'm switching real-time stream capture to low resolution if user selects a canny. With the nature of transofrm, it really doesn't make a whole lot of difference when resolution is low.

     

Anonymous
Anonymous

Add attachments
Cancel