Creating a color gradient area

asked 2018-02-12 10:19:41 -0600

Can you create a linear color gradient (like the color gradients you can generate in CSS) in OpenCV, where you have two or more color thresholds and linear color blending in between?

I want to create one as a Mat struct in C++.

edit retag flag offensive close merge delete


You can create any image with opencv but really it is an image processing library, it not photoshop or gimp...

LBerger gravatar imageLBerger ( 2018-02-13 05:08:48 -0600 )edit

To give some more context of what I mean, suppose that there's a photo of a conference room with a solid color wall, and on that wall is a painting. The painting shouldn't be there in an image, but rather than using image inpainting algorithms, simply cover it over in the image with linear gradient rectangles.

I say linear gradient because suppose that the conference room only has a single light source, which would be a chandelier, and the painting is on the far side of the room. The far side of the painting is darker than the closer side.

GregF458XVM gravatar imageGregF458XVM ( 2018-02-13 11:04:17 -0600 )edit