MATLAB: Editing Images In Matlab

editImage Processing Toolboximages

Hi all
I was wondering if there was any way of editing an image in Matlab.
My aim is to import an image (.jpg) and based on certain criteria automatically draw a Red box in the middle of th eimage and fill the box with red color and then adjust the transparancey so that you can still see the contents of the image.
Below is an example of what i hope to achieve:-
pppp.JPG
Does anyone have any ideas?
Thank you.

Best Answer

Just add an offset to the red channel in the zone you want
rgbImage = imread(filename);
rgbImage(row1:row2, col1:col2, 1) = rgbImage(row1:row2, col1:col2, 1) + 50; % Make red channel 50 gray levels brighter.