Which function could be used to filter out some of the indices a image. I am not sure what would be most effective function I could use?

2 件のコメント

Image Analyst
Image Analyst 2012 年 3 月 9 日
What does this mean? Do you mean delete particular whole rows or whole columns? Or you mean just get rid of single pixels? Realize that your image must remain rectangular.
Ram Ghosh
Ram Ghosh 2012 年 3 月 9 日
Hi
Not particular rows or column but some values (indexes) in a row and column. I have to replce all the values greater that 148 with 1 and less than 148 will be 0. I have this written so far. I dont know where am i doing wrong.
x=imread('bone_1_01200.pcx');
myData=size(x);
for i=1:length(myData(1));
for j=1:length(myData(2));
if x(i,j)>148;
x(i,j) = 1;
else
x(i,j) = 0;
end
end
imwrite(x,colormap,'file.pcx','pcx');
end
V=imread('file.pcx');
imshow(V)

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

 採用された回答

Walter Roberson
Walter Roberson 2012 年 3 月 9 日

0 投票

newx = cast(x > 148, class(x));

1 件のコメント

Ram Ghosh
Ram Ghosh 2012 年 3 月 16 日
Hi thanks for your answer!!!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by