Trouble reading an image using imread in embedded matlab function and trouble with "from-workspace" block
1 次查看(过去 30 天)
显示 更早的评论
I am trying to read a JPG image in from a file and input it to the serial send block in the ICT. I can read the image in with matlab using the imread command but when I put it in an embedded matlab function it errors saying it is not supported in standalone and I need to use coder.extrinsic. I have tried to use it but unsuccessfully. So I just read it into the matlab workspace and then tried to input it to the serial send block using the from workspace command, but I can't figure out how to use the name correctly. So my question is two-fold: 1. How do I use coder.extrinsic with the imread command. My file name is 'lunar.jpg'. 2. If I have it in a matlab variable called 'lunarImage' what do I put in the 'data' field for the From workspace block? If I use lunarImage, it says the format is unsupported (it is a 640 x 480 matrix). I have tried setting the structure using the .time field and the .dimension field, but I must be doing that wrong too. Can anyone show me the correct way to use these two functions (blocks)?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Read, Write, and Modify Image 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!