how can i differentiate between images

I have let suppose have 20 images in which 10 are standard image and 10 are reference images. I consider standard image are those images that don't have tumour (pixels of intensity 255)and reference that contains tumours so I read the directory as
sdirectory =('');
images = dir('*.jpg'); % as i have images of jpg format.
n_files = length(images);
for i = 1 : n_files;
current_file = images(i).name;
I{i} = imread(current_file ;
end
but I want to separate images if image has pixels of 255 intensity then name them reference image else consider them standard image .
I need help.

댓글 수: 3

Nitin
Nitin 2014년 5월 10일
편집: Nitin 2014년 5월 10일
it would be helpful if you could upload a picture of a standard image and that of a reference image.
Filza Ashraf
Filza Ashraf 2014년 5월 10일
here in the image that have white balls is considered as reference image because the image have disk shapes that have 255 intensities and the other one is standard image
Image Analyst
Image Analyst 2014년 5월 10일
편집: Image Analyst 2014년 5월 10일
I fixed your code's formatting but as thanks I'd like you to read this: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup. By the way, do you want to know some of the things wrong with your code?

댓글을 달려면 로그인하십시오.

답변 (1개)

Nitin
Nitin 2014년 5월 10일

0 개 추천

% test image
Img = zeros(20, 20);
Img(5:15,5:15)=1;
% Find if '255' intensity pixels exist in the image
temp = find(Img==255);
if isempty(temp)
display('No tumour');
else
display('Tumour');
end

카테고리

도움말 센터File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

질문:

2014년 5월 9일

편집:

2014년 5월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by