matrix of image, imagine processing toolbox

2 ビュー (過去 30 日間)
Tomas
Tomas 2013 年 11 月 16 日
編集済み: Image Analyst 2013 年 11 月 17 日
I am beginner in image processing toolbox, i have to use this image
how i create matrix of image, when I need only the points that are black so I could continue to work with the coordinates.
THANKS
  1 件のコメント
Tomas
Tomas 2013 年 11 月 16 日
編集済み: Walter Roberson 2013 年 11 月 17 日
I = imread('image.png');
imshow(I)
[m n]=size(I)
I = double(I);
i dont know how to get matrix from binary image,

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2013 年 11 月 17 日
If the badly-named I matrix is already a binary image as you said, then you already have the coordinates as the binary image. In the event that I is really a gray scale image and not a binary image, you can turn it into a binary image (class will be "logical") by thresholding:
binaryImage = I < 127; % or whatever value is between black and white.
In the unlikely event that the binary image is not suitable and you really need vectors of rows and columns, you can do this to binaryImage:
[rows, columns] = find(binaryImage);
So rows(k) and columns(k) refer to the same pixel if k is the same. If you want in a single matrix, of (x,y) form, then you can do
xy = [columns, rows];
  13 件のコメント
Walter Roberson
Walter Roberson 2013 年 11 月 17 日
編集済み: Image Analyst 2013 年 11 月 17 日
X = [rows(:), columns(:)];
Tomas
Tomas 2013 年 11 月 17 日
ok thanks

サインインしてコメントする。

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 11 月 17 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by