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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
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.