Resize the given image breadthwise by pixel deletion. The output is required to have half as many columns as the input

2 ビュー (過去 30 日間)
Resize the given image breadthwise by pixel deletion. The output is required to have half as many columns as the input
(Do not use builtin functions for the same)
.

回答 (2 件)

Image Analyst
Image Analyst 2021 年 11 月 24 日
Sounds like homework.
Hint:
columnIndexes = 1 : 16
columnIndexes = 1×16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
out = columnIndexes(1 : 2 : end)
out = 1×8
1 3 5 7 9 11 13 15
That should be a good enough hint for you to do your homework.

yanqi liu
yanqi liu 2021 年 11 月 25 日
yes,sir,please use Image Analyst method,such as
img2 = img(:,1:2:end,:);

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by