完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
可以详细描述一下什么问题
|
|
|
1 条评论
|
|
|
这是我的模型,其中回调函数如下:
LoadImage.m: %读取原始图像数据 SourceImage2D = rgb2gray(imread('lena1.jpg'));%这里将彩色图像先变为灰度图像 %得到图像的长宽尺寸 ImageWidth = size(SourceImage2D,2); ImageHeight = size(SourceImage2D,1); %将二维数组转换为一维数组 SourceImage1D = reshape(SourceImage2D,1,ImageWidth*ImageHeight); %按照格式形成Simulink的To Workspace模块要求的数据格式 SourceImage1D = [double(0:ImageWidth*ImageHeight-1)' double(SourceImage1D)']; %设置整个模块的输入到输出延时 DesignLatency = 0; ShowImage.m: %将DestImage1D一维数组转换成规定大小的DestImage2D二维数组 DestImage2D = reshape(DestImage1D(DesignLatency+1:DesignLatency+ImageHeight*ImageWidth),ImageWidth,ImageHeight); %按照格式显示输入/输出图像 h = figure; clf; colormap(gray(256)); set(h,'Name',' Bypass Results'); subplot(1,2,1); image(SourceImage2D),axis equal,axis square,axis off;title('Input Image'); subplot(1,2,2); image(DestImage2D),axis equal,axis square,axis off;title('Output Image'); colormap(gray(256)); |
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
我用matlab的coder 封装了一个c语言的dll, 但是在用labview调用时,会出现识别不到库的问题,有大神遇到过吗
2630 浏览 0 评论
5216 浏览 0 评论
在matlab中如何计算含有第一类修正的贝塞尔函数的积分算不出的问题?
9012 浏览 0 评论
怎么利用matlab得到95%,80%和70%的置信区间,并生成不同区间下的功率误差贝塔分布?
10454 浏览 0 评论
请问simulink的s-function模块如何添加多输入输出接口
14615 浏览 2 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 23:55 , Processed in 0.683951 second(s), Total 53, Slave 43 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
818