From: Anish Poudel on 28 Jun 2010 18:48 Hi Folks, I am trying to construct an image of an object provided that I have multiple amplitude signal data for numerous points within the object. I can import these amplitude signal data in EXCEL in csv format. How can I construct image from this in MATLAB? Please help me out! Sincerely, Anish
From: ImageAnalyst on 28 Jun 2010 19:03 Anish Given what you have provided, and making a few assumptions, I'd say that you should read in the data with csvread() and populate an image matrix with the data that you DO know about. Assign whatever pixels you have with whatever values they're supposed to have. Then, for any "missing" pixels, either leave them black or use interp2() to estimate the missing values. Then display it if you want.
From: Anish Poudel on 28 Jun 2010 19:29 Thank you for the response. I want to let you know that I am a beginner in MATLAB and I am learning it to use it. Is there any code already written for this or do I have to come up with new one? Are there any library in MATLAB which is capable of importing these Excel data in MATLAB and setting up pixel values and constructing the images... Thanks, Anish
From: ImageAnalyst on 28 Jun 2010 19:40 Anish Just look at csvread() and interp2() and try to adapt the examples. You can do that as well as I can, or at least you'll learn something from the exercise. You can make an image just by declaring an array rows = 480; % Or whatever... columns = 640; imageArray = zeros(rows, columns); csvStuff = csvread(........); % Assign some pixels. for k = 1:size(csvStuff, 1) row = csvStuff(k,1); % Or wherever it is col = csvStuff(k, 2); pixelValue = csvStuff(k, 3); imageArray(row, col) = pixelValue; end % Look at the partially assigned image. imshow(imageArray, []); % Then call interp2() % Now look at the filled in, complete image array. imshow(imageArray, []);
From: Anish Poudel on 30 Jun 2010 17:40 Thank you for the help! Sincerely, Anish
|
Pages: 1 Prev: str2num Next: Obtaining the pixel values of two black points in an image! |