How to replace image portion with processed image?
显示 更早的评论
I have one rgb image. I crop one portion by using imcrop function. After lots of processing I want to place that processed portion into the same place of the orginal image. How can I do that. I tried by using imfusion but its not worked.
采纳的回答
更多回答(1 个)
Gosselin Thibault
2018-7-12
0 个投票
Hello everybody ! Sorry to view this long date post only but i've the same problem and your solution don't work on my program.
I have this error message : "Unable to perform assignment because the size of the left side is 118-by-325 and the size of the right side is 912-by-1200."
for this line code : Icrop1(row1:row2, col1:col2) = I;
Thank you for your help !!
4 个评论
Image Analyst
2018-7-12
Without your program, all I can say is to make sure your (badly-named) I is 118-by-325. Use imresize() if you think that's appropriate.
Gosselin Thibault
2018-7-12
I fixed my problem; i have just interchanged the originalImage and the processedImage. So yes it was very badly named !
But this solution did not resolve my problem because I also draw a curve on the modified image. I do not know how to draw the equivalent curve on the initial image.
Thank you for your repply and you help !
Duyen Ho
2018-11-24
how did you fix the problem? im getting the same error
Image Analyst
2018-11-24
He said he had
processedImage(row1:row2, col1:col2, :) = originalImage;
when he should have had
originalImage(row1:row2, col1:col2, :) = processedImage;
like I said. When he "interchanged the originalImage and the processedImage" he got my code and it worked. In short, the bigger matrix is on the left, and the smaller submatrix is on the right.
类别
在 帮助中心 和 File Exchange 中查找有关 Images 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!