Unable to perform assignment because the size of the left side is 901-by-1153 and the size of the right side is 901-by-1153-by-3.

조회 수: 1(최근 30일)
Ömer Faruk Kurular
Ömer Faruk Kurular 2019년 9월 25일
답변: Matt J 2019년 9월 26일
I am getting the error int the title. How logical is this error? Left size and right size are equal as error says.
Here is the code
(b_x1, b_y1) left top corner
(b_x2, b_y2) right bottom corner
b_y1 = 180
b_y2 = 1080
b_x1 = 288
b_x2 = 1440
blurred_segment = imcrop(image, [b_x1 b_y1 (b_x2-b_x1) (b_y2-b_y1)]);
image(b_y1:b_y2, b_x1:b_x2) = blurred_segment;
  댓글 수: 1
rough93
rough93 2019년 9월 25일
your blurred_segment image will be a 3 value vector at each point because it is a 2d image with 3 channels. Your b_y1:b_y2, b_x1:b_x2 is only a 2 value vector. I imagine this is where you're getting the error from.

댓글을 달려면 로그인하십시오.

답변(1개)

Matt J
Matt J 2019년 9월 26일
image(b_y1:b_y2, b_x1:b_x2,:) = blurred_segment;

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by