Help with inserting box into photo
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a test image that I am trying to put a 30x30 box in the center of. Here is the code I have so far. I have a column 30 pixels wide but can't figure out how to shorten it. I am new to coding.
MyImage = imread('test.jpg'); BW=rgb2gray(MyImage);
%figure(1); imshow(BW);
pause
BW(:,258:288)=0; % modifiy this line
figure(2); imshow(BW);
1 Kommentar
jonas
am 11 Jul. 2018
"image that I am trying to put a 30x30 box in the center of"
This is unclear to me, do you want the image in the center of the box or the other way around?
If you want to frame the image, do you want to replace the edges of the image with the frame or do you want the frame to extend outside of the image?
Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!