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 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Jeff E
2013 年 11 月 19 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!