The image and code is
I = imread('l.jpg');
%RGB = RGB(:,:,3);
%GRAY = rgb2gray(I);
threshold = graythresh(I);
originalImage = im2bw(I, threshold);
i = bwareaopen(originalImage,350);
m = max(max(i));
[r c] = find(i == m);
fid = fopen('lalit1.txt','wt');
data = textread('lalit1.txt');
r = unique(data);
c = data(data(:,1)==i,2);
z(i,1) = mean([min(c) max(c)]);
This shows error..
??? Subscripted assignment dimension mismatch.
No products are associated with this question.
Where does it show that error?
If it is the z assignment in the for loop, then put a breakpoint in at the assignment and show us size(c), and size(mean([min(c) max(c)]))
Play games and win prizes!Learn more