Help with inserting box into photo

1 次查看(过去 30 天)
Taylor Gates
Taylor Gates 2018-7-11
评论: jonas 2018-7-11
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 个评论
jonas
jonas 2018-7-11
"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?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by