I am trying to add 2 binary masks of the same image for overlap ratio calculation I create the binary masks as such:
mask1 = roipoly(image,points1(:,1),points1(:,2))
mask2 = roipoly(image,points2(:,1),points2(:,2))
imwrite(mask1,'mask1.bmp')
imwrite(mask2,'mask2.bmp')
points1 and points2 are 2 different matrices of segmentation coordinates of the same size
When I try to do the following, i get Matrix dimension must agree
error using plus
a=('mask1.bmp')
b=('mask2.bmp')
a+b
When i check the sizes of a and b they give same values but somehow the matrix dimensions don't agree
a+b
is adding the characters of two strings together, and does not error. – Andrew Jankeimage
build-in function in MATLAB. Don't use it as a variable name. – yuk