Reconstruct an image after finding seam to remove in seam carving

3 ビュー (過去 30 日間)
Jiehao Zhu
Jiehao Zhu 2018 年 2 月 25 日
回答済み: Mahmoud Afifi 2020 年 5 月 7 日
In the seam carving algorithm, I've found the index of the seam to remove from an image. How would i go about reconstructing the image now without the seam?
I've attempted to do something like this where the new image contains all original image coordinates and when i reach the seam's index, i skip ahead by 1 and set that as the next value. However, doing this just shows me a couple of pixels that have been reconstructed and not the entire image
newimage = zeros(x,y-1); for i=1:x r=remove(i); for j=1:y if j==r newimage(i,j)=img(i,j+1); else newimage(i,j)=img(i,j); end end end

回答 (1 件)

Mahmoud Afifi
Mahmoud Afifi 2020 年 5 月 7 日
Check this Code

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by