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

1 visualización (últimos 30 días)
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".

Respuesta aceptada

Image Analyst
Image Analyst el 1 de Mzo. de 2022
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 comentario
MatlabUser
MatlabUser el 1 de Mzo. de 2022
Editada: MatlabUser el 1 de Mzo. de 2022
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?

Iniciar sesión para comentar.

Más respuestas (1)

yanqi liu
yanqi liu el 1 de Mzo. de 2022
may use imdilate to dilate image by ones(2,2)

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by