Plz help me
How i find the mid position in x y values.
this is my code
clear all;[filename pathname]=uigetfile('*.jpg;*.png;*.tif;*.tiff;*.gif;*.bmp;');inputimage=imread([pathname filename]);I=inputimage;% I = imread('5.png') ;
I = rgb2gray(I) ;[y,x] = find(I) ;figureimshow(I)hold onplot(x,y,'.b')% x
% y
% z=(y+x)/2
% plot(z,'.r')
plot(x(1),y(1),'*y')plot(x(end),y(end),'*y')%
line([x(1),0],[y(1), 0])line([x(end),0],[y(end), 0])figure(1);line([0 1],[0 1]);
Best Answer