Writing a PNG image to a Database
조회 수: 2 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (1개)
Raghava S N
2024년 10월 23일
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!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!