How to assign 255 pixel value to Index Values and crop image in MATLAB

4 ビュー (過去 30 日間)
Stephen john
Stephen john 2022 年 8 月 22 日
コメント済み: Image Analyst 2022 年 8 月 24 日

回答 (1 件)

KSSV
KSSV 2022 年 8 月 22 日
x0 = min(rows1) ;x1 = max(rows1) ;
y0 = min(columns1) ; y1 = max(columns1) ;
I = imcrop(grayImage,[y0 x0 (y1-y0) (x1-x0)]) ;
  2 件のコメント
Stephen john
Stephen john 2022 年 8 月 22 日
@KSSV not to crop grayImage, First I wanted to create a 2d Image using rows1 matrix
Image Analyst
Image Analyst 2022 年 8 月 24 日
I know I've told you before but please read this:
I know you haven't because your question body is empty except for "How". And your comment just now in no way has anything at all to do with your original question. Plus you refer to some "rows1" matrix which has never been mentioned anywhere in your post before, so how are we supposed to know what to do with that? If you had read the tutorial you would not be making posts like this. Make it easy for people to help you, not hard.
You can create an image with ones(), zeros(), or imread() or just regular assignment.

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

カテゴリ

Help Center および File ExchangeImages についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by