solve a 3 equations and 3 variables for images

1 次查看(过去 30 天)
Hi,
I am trying to solve a three equation and thre variables for (each pixel) a set of images. I have solved different errors but I do not know what exactly I should do now and would be grateful if you help me.
here is part of the code:
for i=1:rows
%fprintf('j=', j);
for j=1:columns
%d1 , d2 , d3 are the value of pixels in three images
d1(i,j)
d2(i,j)
d3(i,j)
A=[H1, H2, H3; G1, G2, G3; F1, F2, F3]; % these are scalar values for example: H1=2648
B=[d1(i,j);d2(i,j);d3(i,j)];
X=inv(A)*B;
x=X(1);
y=X(2);
z=X(3);
R1(i,j)=x;
R2(i,j)=y;
R3(i,j)=z;
end
end
Error:
Error using *
MTIMES (*) is not fully supported for integer classes. At least one argument must be scalar.

采纳的回答

Walter Roberson
Walter Roberson 2019-7-11
X = A\double(B)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by