I have question on how to edit pictures. What i am trying to do is read in two images to matlab and i am trying to replace a part a part one the first picture with a part from the second image.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
For example, If the first image is of the car and it car a toyota sign on the car, and the second image has a sign of honda. I want to be able to replace the toyota sign on the first image with the honda sign from the second image. If anyone could please give me a step by step on how to do this please.
0 Commenti
Risposte (1)
Jeff E
il 19 Nov 2013
Below is a simple way to just swap a portion of toyota_image, given the coordinates of a boundingbox (ttop = y coordinate of top edge, tright = x coordinate of right edge) with a portion of honda_image of the same size, again given a second set of boundingbox coordinates.
toyota_img(ttop : tbottom , tleft : tright , :) = honda_image(htop : hbottom , hleft : hright , :);
Swapping out portions of images becomes a bit more difficult if they are not boxes. Let us know if that is your use case.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!