automating a code for image processing
8 次查看(过去 30 天)
显示 更早的评论
I have a code that reads an image and it gives two answers or two results about it
I want to automate it so it can give a matrix with results for each image
lets say i have images named like this:
image00 image01 image02 image03 image04 image05 image06
my code gives two answers when it reads an image lets say A and B.
i want the code to read the 7 images at the same time and give a matrix with the answers
like this maybe
[A00, A01, A02...] and [B00, B01, B02...]
IS THERE A WAY TO DO THIS?
ANY HELP WOULD BE GREATLY APPRECIATED
THANK YOU
0 个评论
回答(2 个)
Image Analyst
2014-6-24
Well you can try this framework: http://www.mathworks.com/matlabcentral/fileexchange/24224-magic-matlab-generic-imaging-component
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..................
Or you can read the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F and build that code into a button that batch processes all the images. Then have a function to process each one
for k = 1 : totalNumberOfImages
[A, B] = AnalyzeSingleImage(filename);
end
A lot is left out of that code obviously. MAGIC will have that and you just need to replace the contents of AnalyzeSingleImage() with your own code.
2 个评论
Image Analyst
2014-6-24
Ruben's "Answer" moved here since it's a response to me, not an "Answer" to his original question:
thank you for your quick response,
what you suggested doesn't seem to work for my case since my file is not set up as a function and the error reads
Attempt to execute SCRIPT as a function:
Error in autoangularity (line 2) [A, B] = AnalyzeSingleImage(.....);
Am I doing something wrong?
Image Analyst
2014-6-24
Your m-file must start with
function autoangularity()
if you have defined AnalyzeSingleImage in the same file. What I suggested will work - you just did it incorrectly but forgot to show me your code so I won't be able to tell you what you did wrong until tomorrow.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!