Help with inserting box into photo
조회 수: 2 (최근 30일)
이전 댓글 표시
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
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 Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!