How to extend an image using convolution
Ältere Kommentare anzeigen

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?
Antworten (1)
Image Analyst
am 16 Mai 2014
0 Stimmen
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 Kommentare
Mahi Nazir
am 16 Mai 2014
Mahi Nazir
am 16 Mai 2014
Image Analyst
am 16 Mai 2014
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
am 16 Mai 2014
Mahi Nazir
am 16 Mai 2014
Mahi Nazir
am 16 Mai 2014
Image Analyst
am 16 Mai 2014
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
am 16 Mai 2014
Image Analyst
am 16 Mai 2014
To make the line broader, set the 'LineWidth' option:
plot(x,y, 'LineWidth', 5);
Mahi Nazir
am 16 Mai 2014
Image Analyst
am 16 Mai 2014
Try the surf() function.
Mahi Nazir
am 16 Mai 2014
Kategorien
Mehr zu Images finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
