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 ?

Our Matlab assignment helpers for online MATLAB assignment help service take utmost care of your assignments by keeping the codes simple yet of high-quality. We offer the most reliable MATLAB solutions to students pursuing their Computer Science course from the Monash University, the University of Sydney, the University of New South Wales, the University of Melbourne; to name a few. Approach us today for best Matlab solutions online!

Our Comprehensive Matlab Assignment Help Services

Personalized Tutoring:Our team of MATLAB experts offers one-on-one tutoring sessions tailored to your specific needs. Whether you’re struggling with basic concepts or advanced algorithms, we provide clear, step-by-step guidance to help you understand and master MATLAB.

Assignment Assistance:Facing tight deadlines or complex assignments? We’re here to help! From initial problem analysis to code development and debugging, we offer full-spectrum support to ensure your assignments meet the highest standards.

Project Development: Need help with a research project? Our specialists can assist you in designing and implementing robust MATLAB solutions. We cover everything from project planning and data collection to coding, simulation, and result analysis.

Coursework Support: We provide comprehensive support for your coursework, helping you understand lectures, complete lab exercises, and prepare for exams. Our goal is to ensure you grasp the core principles and practical applications of MATLAB.

Thesis and Dissertation Guidance:Writing a thesis or dissertation? Our experts can assist you in incorporating MATLAB for data analysis, modeling, and simulation. We help you develop a strong methodological framework and ensure your research stands out.

whatsApp order on matlabhelpers.com

telegram order on matlabsolutions.com