How to convert image .mat back to the mlreportgen.dom.Image object?
이전 댓글 표시
In report generator, an Image object can be inserted in the report in this way:
mlreportgen.dom.*
rpt = Document('my_report','pdf');
img = Image('my_image.jpg');
img.Style = {Width('5in'),HAlign('center')};
append(rpt, img);
Now, the image is already read into .mat data with:
read_img = imread('my_image.jpg'); % now, read_img is in 640x480x3 uint8 format
How to create an Image object as above but from this later read_img data?
img = Image(anyway_some_function(read_img));
채택된 답변
추가 답변 (1개)
Nitin Kapgate
2021년 1월 13일
You can create an Image Object from the "read_img" data using the following code:
read_img = imread('my_image.jpg'); % Read the image
img = image(read_img);
카테고리
도움말 센터 및 File Exchange에서 Images, Figures, Axes, Equations, MATLAB Code, and MATLAB Variables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!