How to extend an image using convolution
显示 更早的评论

Hi I have this plot which I saved as an image. I need to extend it to a certain width. I think I can use convolution? I haven't done any image processing before. Absolutely new to this. Read about convolution so have an idea what it is. Can someone please guide me through this. How do I perform convolution for this?
回答(1 个)
Image Analyst
2014-5-16
0 个投票
Convolution will enlarge an image but it filters the image and you haven't said that you want to blur or sharpen the image. Why not try padarray() to just add some layers of zero value pixels around the outer edge of the image?
12 个评论
Mahi Nazir
2014-5-16
Mahi Nazir
2014-5-16
Image Analyst
2014-5-16
You said "plot which I saved as an image" meaning that you made a plot , then you saved the plot (axes, blue line, tick labels, white space, etc.) as an image using something like saveas() or export_fig(). You didn't say anything about the blue line in the image which you plotted in that plot/chart/graph. That blue line is a 1-D signal, not an image so I did not expect that you would be talking about that. Is it THAT that you want to talk about rather than the "plot which I saved as an image"?
Mahi Nazir
2014-5-16
Mahi Nazir
2014-5-16
Mahi Nazir
2014-5-16
Image Analyst
2014-5-16
OK, so you have a 1D array that is your signal. You can extend it by setting a later index. Let's say it's 15 long and you want it to be 30 long. You can do this:
vec(30) = 99; % Fill elements 16-29 with 0 and element 30 with 99.
Of course you can have the 99 be zero, but I just wanted to illustrate that all the "in between values" will be zero and the one you set will have the value you set.
Mahi Nazir
2014-5-16
Image Analyst
2014-5-16
To make the line broader, set the 'LineWidth' option:
plot(x,y, 'LineWidth', 5);
Mahi Nazir
2014-5-16
Image Analyst
2014-5-16
Try the surf() function.
Mahi Nazir
2014-5-16
类别
在 帮助中心 和 File Exchange 中查找有关 Images 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
