compare the intensity of a pixel with the one next to it
1 回表示 (過去 30 日間)
古いコメントを表示
Yassine Zaafouri
2017 年 1 月 25 日
コメント済み: Yassine Zaafouri
2017 年 1 月 25 日
I have an Image (grayscale) and i want to compare each Pixel with the one next to it and if the value increases or decreases with more than 300 , i want to store its Location and then plot it with another Color on the picture . can any one help me please ? Thank you
0 件のコメント
採用された回答
Takuji Fukumoto
2017 年 1 月 25 日
if 'one next to it' means right side pixcel, you can identify the value increase/decrease more than 300.
I = imread('filename');
r = numel(I(:,1))
ext = zeros(r,1);
I1 = [I ext];
I2 = [ext I];
I3 = I1-I2;
Iout = abs(I3) > 300;
2 件のコメント
Walter Roberson
2017 年 1 月 25 日
Better is I3 = double(I1) - double(I2); because images are typically integer data class.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!