I want to make a 3x2 matrix on an image
1 次查看(过去 30 天)
显示 更早的评论
I want to make a 2x3 matrix on each component of an image. Attached is the picture.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/158891/image.jpeg)
Actually, I want to make a matrix, so that each dot in the picture lies in different index of the matrix. I need code. Kindly help please!
2 个评论
Guillaume
2016-12-12
Your patterns appear to be 2x2 or 3x2 (rows by columns is the matlab convention), not 2x3.
An example of the desired output for the above input would clarify what you need.
回答(1 个)
Image Analyst
2016-12-11
编辑:Image Analyst
2016-12-11
Get a library of all possible dot patterns then just paste onto the desired location in your image. See my copy and paste code, attached.
11 个评论
Image Analyst
2016-12-12
You'll need to find whole rows, because otherwise you if you have, say, a pair of dots, you won't know if it's in the first row, second row, or third row. You won't know that with your method of dilating and taking the bounding box. So you're going to have to find tops and bottoms of the whole line of characters first. Then you can do what you said to get the right and left sides. THEN you can crop the bounding boxes, and then divide into 6 zones to determine what zones have a spot in them.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!