batch image processing loop

new to matlab. I have a high number of images to process. After counting pixels with a certain intensity for all images using a loop , I would like to put the results in a table, where each result is given for each image. Thanks.

回答(1 个)

Image Analyst
Image Analyst 2015-6-14

0 个投票

That's exactly what the MAGIC framework does, right down to filling up your grid/table.
Description: This GUI will help the novice user get up to speed very quickly on using GUI-based applications. Everything is laid out in a very simple Step 1, Step 2, Step 3, etc. layout. It is a very good starting point for a typical image analysis application. This application uses GUIDE to do the user interface design, and has most of the basic controls such as buttons, listboxes, checkboxes, radio buttons, scrollbars, etc. It allows the user to select a folder of images, select one or more images and display them, to select a series of options, and to individually or batch process one or more images. The user can ........

3 个评论

By the way, to count pixels
binaryImage = grayImage == desiredGrayLevel;
pixelCount = sum(binaryImage(:));
Thanks for the reply. I am Ok counting pixels - only problem is that I only get the count from the last image and not the counts for all other images.
It's evident you didn't look at the link I gave you. Alright, if you want to do it yourself, then you will have to index the pixel count - add an index to it so that it stores the value for the k'th image in the k'th element of an array called pixelCount:
pixelcount(k) = sum(binaryImage(:));
This is just super basic computer programming like you'd learn in the first week of any introductory programming class. Now pixelcount will be a list of the pixel counts in each image if you put that in a loop over all the images with "k" as the loop iterator variable. See this link.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by