Ask Your Question
0

how to extract the Mat of non square object in opencv?

asked 2013-10-13 01:16:20 -0600

helxsz gravatar image

updated 2013-10-13 02:06:40 -0600

berak gravatar image

I am using opencv (both c++ and java) to segement a white paper in the picture showed below, this works , but now I have to split the paper into 8 small section and get the Mat of each section, since each section is not a pure square, it is hard to use submate(startrow, endrow, startcol, endcol).

Is there any way in opencv to extract the Mat for this kind of none square object?image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-10-13 05:15:16 -0600

Guanta gravatar image

No, a Matrix in OpenCV can not have different number of columns/rows. You need to use an additional mask-matrix to mask those values.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-10-13 01:16:20 -0600

Seen: 248 times

Last updated: Oct 13 '13