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!