Developt matlab to website ??
17 views (last 30 days)
Show older comments
Hi, I have finished testing the data, I want to display the results through the website, but the results I want to display are the following schemes:
image input (web) -> processing in matlab -> output (web).
My answer is, what should I do for it? Which one code should I package? from preprocessing image and code for testing ?
please help me, thank you
4 Comments
Rik
on 8 Dec 2018
GNU Octave is a program with mostly Matlab compatible syntax. For simple projects you can use them interchangeably.
I can imagine it would be a little bit easier to integrate Octave into your website than Matlab would be. I don't have the experience to give you more details about how to do that integration.
A last note: as this website is maintained by Mathworks, it is discouraged to ask questions that only apply to Octave. It is fine if your question is directly applicable to Matlab as well.
Accepted Answer
More Answers (1)
Stephen
on 29 Jul 2023
To achieve the desired functionality of displaying results through a website with the following flow: image input (web) -> processing in MATLAB -> output (web), you'll need to create a web application that can interact with MATLAB for image processing. Below, I'll outline the steps you can follow:
- Set up the web application: Choose a web development framework to build your website. Common choices include Flask (Python-based), Express (Node.js-based), or Django (Python-based). Select the one you are most comfortable with.
- Create the frontend: Design and implement the web pages where users can upload their images. You can use HTML, CSS, and JavaScript for this part. Add a form element to the webpage to allow users to upload images.
- Handle image upload: In your web application backend, implement the code to handle the image upload. When users upload an image, the server should receive the image file.
- Call MATLAB for image processing: To interact with MATLAB from your web application, you can use the MATLAB Engine API for Python (if you're using Flask) or MATLAB Engine API for Node.js (if you're using Express). These APIs allow you to call MATLAB functions from your backend code.You'll need to write the image processing code in MATLAB. This code should take the uploaded image, process it according to your requirements, and generate the output.
- Save and serve the processed image: Once the MATLAB processing is complete, save the output image on your server or in a specific directory. Then, serve this processed image to the user through the web interface.
- Update the web page with the processed image: Update the frontend code to display the processed image on the webpage. You can achieve this by either replacing the image or creating a new section on the page to show the processed result.
- Package the code: Package both the frontend and backend code together to deploy your web application on a server or hosting service.
Remember, you'll need to have MATLAB installed on the server where your web application will run, and you should ensure the MATLAB Engine APIs are set up correctly on that server.
See Also
Categories
Find more on Application Deployment in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!