how to repeat the same pixel values of one image region (e.g., one superpixel) into another one?

조회 수: 1 (최근 30일)
given an image that has been segmented into smaller regions (superpixels). How to repeat same content (color pixel values) of one region in the image (e.g., superpixel with id = 1) into another one (e.g., superpixel with id=2) if the sizes of them are slightly different,
"interpolation or padding are allowed".

채택된 답변

Image Analyst
Image Analyst 2022년 3월 1일
Well the shapes of each superpixel will be different so what are your plans regarding the different shapes?
Anyway, for what it's worth, attached is my demo for copying and pasting irregularly shaped regions.
  댓글 수: 1
MatlabUser
MatlabUser 2022년 3월 1일
편집: MatlabUser 2022년 3월 1일
thanks a lot for your answers,
I like your copy_paste_image_freehand example...
It is near to what I want to achieve, I only still need to deal with the size differences between the two superpixels, since i have the mask for both of them I just want to compensate any pixels that does not have corresponding pixels in the first superpixels by interpolation or padding or any other idea?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

yanqi liu
yanqi liu 2022년 3월 1일
may use imdilate to dilate image by ones(2,2)

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by