Ask Your Question

Creating a color gradient area

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

GregF458XVM gravatar image

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 -0500 )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 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2019-09-11 04:00:26 -0500

cancerberosgx gravatar image
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-02-12 10:19:41 -0500

Seen: 2,824 times

Last updated: Sep 11 '19