关闭。这个问题需要更多focused.它目前不接受答案。想改进这个问题吗?更新问题,使其只关注一个问题editingthispost.关闭5天前。Improvethisquestion我刚开始学习OpenCV,我想知道如何转换像这样的图像:进入占用网格,像这样:intgrid[ROW][COL]={{1,0,1,1,1,1,0,1,1,1},{1,1,1,0,1,1,1,0,1,1},{1,1,1,0,1,1,0,1,0,1},{0,0,1,0,1,0,0,0,0,1},{1,1,1,0,1,1,1,0,1,0},{1,0,1,1,1,1,0,1,0,0},{1,0,0,0,0,1,0