Ask an expert. Trust the answer.

Your academic and career questions answered by verified experts

GUI in MATLAB for video

Date: 2022-12-21 12:53:04

I have a video of about 200 frames. I want to capture every 10th frame, do some image processing on it and display the original image along with the plot (after my image processing steps). The output should be first the 10th frame and its plot, and only after i click a push button should it move on and do the processing on the 20th frame, display it and so on. Once i get the desired frame for eg. 180th frame, i want to display the total time elapsed to reach that frame (if frame rate is 10 frames/sec then it should display 18 sec).

Till now i was dealing with separate frames and doing image processing on them and manually calculating the results. But a GUI would make this process more efficient 

Expert Answer:

s: 

Neat problem. Here's what you can do:

  1. At program startup, use dir, (like this: filelist = dir('*.bmp')) to get a list of all of the image files in the folder in which you are working.
  2. Assign that list to the guidata handles, like so: handles.filelist = filelist. While your at it, add another handle value to hold your current image index, handles.frameindex = 1, you'll need this later. Don't forget to update guidata afterwards!
  3. In the pressed callback function of your pushbutton, do something like this:

    filelist = handles.filelist; frameindex = handles.frameindex; currentframefile = filelist(frameindex); handles.frameindex = frameindex+1;

  4. Use the currentframefile, which is a string containing the name of the current frame, with your existing GUI.

This should answer your question, if I understand it correctly. Let me know if you need clarification. Good Luck!

Why Matlabhelpers ?

Looking for reliable MATLAB assignment help? Our expert MATLAB tutors deliver high-quality, easy-to-understand solutions tailored to your academic needs. Whether you're studying at Monash University, the University of Sydney, UNSW, or the University of Melbourne, we provide trusted MATLAB assistance to help you excel. Contact us today for the best MATLAB solutions online and achieve academic success!

MATLAB Assignment Help Services

Personalized Tutoring: Get one-on-one guidance from our MATLAB experts. Whether you're tackling basic concepts or advanced algorithms, we provide clear, step-by-step explanations to help you master MATLAB with confidence.

Assignment Assistance: Struggling with tight deadlines or complex assignments? Our team offers end-to-end support, from problem analysis to code development and debugging, ensuring your assignments meet the highest academic standards.

Project Development: Need expert help with your MATLAB research project? We assist in designing and implementing robust solutions, covering project planning, data collection, coding, simulation, and result analysis.

Coursework Support: Enhance your understanding of MATLAB with our comprehensive coursework assistance. We help you grasp lecture concepts, complete lab exercises, and prepare effectively for exams.

Thesis and Dissertation Guidance: Incorporate MATLAB seamlessly into your thesis or dissertation. Our experts provide support for data analysis, modeling, and simulation, ensuring your research is methodologically sound and impactful.

Contact us on WhatsApp for MATLAB help

Contact us on Telegram for MATLAB solutions