hello i am working on a project in matlab for the reflectivity measurement...can any body help me ?

i have a code for generating area plot of multiple images but it takes all the plots in a loop and after loop it takes only the last plot..i want area of each plot to be save in a variable and make an array of these variables...here is my code.
for i=1:7;
for j=-3:3;
file_name=strcat('C:\Users\ASUS\Desktop\imgs\c',num2str(i),'.gif');
im=imread(file_name);
[centers, radii]=imfindcircles(im,[10 20]);
center=centers(1,2);
c=round(center);
area(im(c+j,:));hold all;
end
end
but this gives all area in a single figure..i need to plot area of particular image within that range in a figure and save it for further calculation....any idea for this..?

4 Comments

Please explain what you want to store exactly: im(c+j,:)? Or im? The reading and processing of the image does not depend on j, so you can move this outside the inner loop.
i just want to calculate area of particular spot in series of images and plot these area points in a separate figure. im(c+j,:) for taking center point around rows within +-3 range.
suppose u ve an image with a white spot at some location....i just want to calculate the total intensity of this spot....like wise there is a series of n images with spot at different positions and different area..so i just want to catch them all and plot their intensity ...

Sign in to comment.

Answers (2)

area_calc=[]; for i=1:7 for j=-3:3 file_name=strcat('C:\Users\ASUS\Desktop\imgs\c',num2str(i),'.gif'); im=imread(file_name); [centers, radii]=imfindcircles(im,[10 20]); center=centers(1,2); c=round(center); area_calc(i)=area_calc(i) + area(im(c+j,:)); hold all; end end
Hi check with this. As per my understanding this must help you out. If my understanding is incorrect please let me know the correct one.

1 Comment

i have tried this one but its giving error: area_calc(i) matrix exeeds index dimension.

Sign in to comment.

"i just want to calculate area of particular spot", so see my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

1 Comment

can you help me in developing a GUI for plotting intensity sum of images. I have a series of images in which a reflected x-ray spot position and intensity is varying and i want to calculate the intensity of these spots and plot it in a graph. I have made a code for that but its not working correctly for those images in which spot intensity is very low. I can send u that code by mail. please tell me whats the problem.

Sign in to comment.

Categories

Find more on Images in Help Center and File Exchange

Asked:

on 7 Feb 2015

Commented:

on 1 Apr 2015

Community Treasure Hunt

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

Start Hunting!