Fast filling of a region

asked 2017-10-03 06:51:03 -0500

cjacquel gravatar image

Hello,

I want to fill a region of an image with a given color.

But I don't want to make a loop on all the image pixels to do it.

Does there is a fast method like a growing process to fill a region ?

Thx, cjaquel

edit retag flag offensive close merge delete

Comments

do you know already the region you want to fill?

VxW gravatar imageVxW ( 2017-10-03 09:54:06 -0500 )edit

if the region is rectengular you can use "setTo"

VxW gravatar imageVxW ( 2017-10-03 09:55:58 -0500 )edit
1

you can use floodFill

LBerger gravatar imageLBerger ( 2017-10-03 11:02:32 -0500 )edit