Help with inserting box into photo

2 Ansichten (letzte 30 Tage)
Taylor Gates
Taylor Gates am 11 Jul. 2018
Kommentiert: jonas am 11 Jul. 2018
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
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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

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!

Translated by