Question

Can I use remap to map one image into another image with a different size?

for example assume that I want to map all pixels from image one (with size a,b) that x+y<100 into a new image and the size of new image should be 2a+b, 2b+a.

Was it helpful?

Solution

remap is more suited for geometical transformations of image. If you are aiming for image resizing only imresize is a better option for image resizing images. In your case your can simply write

resize(source_Img, destination_Img, Size(2a+b,2b+a), 0, 0, interpolation);

OTHER TIPS

Yes you can do that if you provide map image of required size. See documentation of remap.

Is there any reason that you can't use resize function for that?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top