Creating a binary image with rgb values
古いコメントを表示
I have to genarate a binary image of an ellipse having its inside as white while outside as black.But , the problem i am facing is that whenever the foreground and background of my input ellipse is either light or dark then the binary image becomes all black or all white.
6 件のコメント
Adam Danz
2020 年 4 月 15 日
What function and parameter values are you using to create the binary image?
aditya shrivastava
2020 年 4 月 15 日
aditya shrivastava
2020 年 4 月 15 日
Adam Danz
2020 年 4 月 15 日
Explore the various methods and optional parameters.
aditya shrivastava
2020 年 4 月 15 日
回答 (1 件)
Adam Danz
2020 年 4 月 15 日
Use imbinarize(). The output can be used to determine whether the center pixel is black (0) or white (1).
BW = imbinarize(. . .)
centerPixelValue = BW(round(size(BW,1)/2),(round(size(BW,2)/2)));
カテゴリ
ヘルプ センター および File Exchange で Image Segmentation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!