MATLAB Answers

how to convert some binary data to image in matlab

18 views (last 30 days)
Aparna
Aparna on 31 May 2011
Edited: Walter Roberson on 17 Jan 2017
hai iam doing my M.Tech prjct in matlab. i dont know hoe to give an image as input. so plz clarify my doubt

  1 Comment

Oleg Komarov
Oleg Komarov on 31 May 2011
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer

Sign in to comment.

Accepted Answer

Jan
Jan on 31 May 2011
Try IMREAD.

  0 Comments

Sign in to comment.

More Answers (2)

KIRAN kumar
KIRAN kumar on 17 Jan 2013
uigetfile can also be to read image from any directory

  1 Comment

Walter Roberson
Walter Roberson on 17 Jan 2013
No, uigetfile() only returns the file name (and path). It does not read the file. You need imread() for that.

Sign in to comment.


Vijan Kaush
Vijan Kaush on 17 Jan 2017
Edited: Walter Roberson on 17 Jan 2017
I = imread('image.jpg'); % read jpg image
Igray = rgb2gray(I); % convert rgb image to gray scale image
Ibinary = im2bw(Igray,graythresh(Igray)); % convert gray image to binary image

  0 Comments

Sign in to comment.

Sign in to answer this question.