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!
