Reading and showing multiple .png format pictures from a folder

heyyy i am stuck in reading multiple .png format files from a folder and then i want to show it as well... i am using imread and imshow functions as well but its not working.. any idea? please help soon as i want it urgent :(

1 Comment

I have removed the "urgent help --->". The term "urgent" does not encourage users to help you.

Sign in to comment.

 Accepted Answer

Beyond that, if your code doesn't work and the FAQ code doesn't work, you're going to have to post your exact code for us to figure out what is going wrong. Can you view a single one of your images with imread() and imshow() without doing it in a loop?

More Answers (1)

welll this is my code without loop and now i want to read multiple image files from a folder and perform the same task from line 2 till the showing command (imshow())...
im = imread('exp30096.png');
a=rgb2gray(im);
b=imresize(a,0.4);
c=medfilt2(b,[3 3]);
X=c;
figure; imshow(F);
and the link u posted really sounds helpful will implement it and will let you know ! thank you soooo much!!
[EDITED: Code formatted, Jan Simon]

5 Comments

out of this.. do you have ne idea as to how extract only round objects from an image, because i tried but there is always a threshold problem i have to change it every time..
I see no reason why your code should not work, though you can just show c and don't need the intermediate variable X. Even better would be if you chose descriptive variable names like rgbImage or grayImage rather than cryptic one or two letter variable names. What happens when it tries to execute the imshow() command? Is there some error message? Or does it just hang? Or does it display an all black image? What???
star girl, you should see my BlobsDemo at:
http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
If you still have problems after that post your image to tinypic.com.
The code shown here does not define F.
You're right. I just glossed over that and assumed the imshow was showing the intermediate value X. Yep, that would cause the problem, and shows how things can be solved sooner if people would just post the actual error messages.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!