MATLAB: How to replace image portion with processed image

digital image processingimage processingImage Processing Toolbox

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.

Best Answer

Since you cropped it, you know what the starting and stopping rows and columns are. So just assign:
originalImage(row1:row2, col1:col2, :) = processedImage;