Ask Your Question
0

What does this specific matrix constructor does?

asked 2017-10-13 18:29:40 -0600

jenia2010 gravatar image

updated 2017-10-13 18:32:08 -0600

What does this constructor does?

Suppose you feed it rectangles in a loop like done here, will it create Matrix that will span all the rectangles?

If I am right, and that loop and constructor are sort of concatenating the different rectangles into one matrix called mask, then how can I do the same in a better way? Surely there must be a function for that in OpenCV.

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-10-13 21:04:53 -0600

Tetragramm gravatar image

That constructor is the same as doing

Mat roi = mask(rectant);

Each iteration of that loop sets a new rectangle to CONTOUR_COLOR. Mask already exists at it's full size, and various sub-rectangles inside of it are being set to CONTOUR_COLOR.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-10-13 18:29:40 -0600

Seen: 483 times

Last updated: Oct 13 '17