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(:));
John F.
John F. 2015년 6월 14일
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에 대해 자세히 알아보기

질문:

2015년 6월 14일

댓글:

2015년 6월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by