Writing a PNG image to a Database

3 次查看(过去 30 天)
David Parks
David Parks 2015-4-17
回答: Raghava S N 2024-10-23,8:58
I have the DB toolkit installed, and I'd like to output an image to the DB that was manipulated in matlab.
The image is either an MxNx3 RGB matrix, or MxN grayscale map in matlab, and I'd like it to store as a PNG formatted BLOB in the DB.
This seems hard. The functions are there for outputting to a file, but they seem hard coded to files and don't seem to be structured to output to the DB instead. Is there hope?

回答(1 个)

Raghava S N
Raghava S N 2024-10-23,8:58
Hi,
Refer to the workflow proposed by the MathWorks Support Team to store an image or figure into a database from MATLAB using the Database Toolbox in this MATLAB Answers post - https://www.mathworks.com/matlabcentral/answers/97768-how-do-i-insert-an-image-or-figure-into-a-database-using-the-database-toolbox-in-matlab.
This workflow can be used on “PNG” formatted images as well as the function “imread” can take “PNG” images as input. Refer to the following link for more information about the function “imread” - https://www.mathworks.com/help/matlab/ref/imread.html#btnczv9-1_sep_mw_88d166d0-41d5-499a-ac3c-ef35689b87eb:~:text=Example%3A%20%22C%3A%5CmyFolder%5CmyImage.png%22.
Hope that helps!

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by