Put some background pixel into top and bottom of a image

2 ビュー (過去 30 日間)
Malan Jayanka
Malan Jayanka 2016 年 10 月 23 日
コメント済み: Image Analyst 2016 年 10 月 23 日

I have a image like this and I want to put some background pixels to top and bottom of the image. How to do this??

回答 (1 件)

Image Analyst
Image Analyst 2016 年 10 月 23 日
Expand the canvass with padarray(). Then use copy and paste, like my attached demo.
  2 件のコメント
Malan Jayanka
Malan Jayanka 2016 年 10 月 23 日
編集済み: Malan Jayanka 2016 年 10 月 23 日
Expand the canvass with padarray() mena this?
And also this code is work only for gray scale images??how to do this with RGB images??
Image Analyst
Image Analyst 2016 年 10 月 23 日
The newly attached version also handles color and indexed images.

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by