From: Jeremy Ho on
just uploaded the picture in your group. here's the link.

http://cssmrepository.googlegroups.com/web/spine.bmp?gsc=hhku8C4AAABI4IiSPCh37XUwHzHPCHT2MPKmTwlEk1y_xEnLLvfbwe1ktQu4-XJcc254J1fDHgM

thanks!
From: Gonzalo on
Hey man, my idea might not be very sophisticated but think about it. Have your image rendered as black white matrix in Matlab. You approximately know where the white squares will be. Create a "window" that moves spans the matrix vertically in the vicinity of the squares and selects the rows (as vectors) and another that moves horizontally and selects the columns. The vectors will have steep spikes (positive or negative) where the black dots are located. Write a code to identify them in both "windows". There you can get the coordinates.

Save to excel? xlswrite('coordinates.xls., coords(x,y)).

hope this triggers some ideas..
From: Jeremy Ho on
Hi Gonzalo,
Thanks for your help! Problem is, I have alot of ideas but I don't know how to write them in MATLAB. I've never learnt MATLAB before and getting this far was already quite a struggle. I would really appreciate if you could help with the codes. Thanks!!

Jeremy
From: Gonzalo on
Alright buddy, this is just a humble suggestion.

1) You load you image to Matlab. (open, etc)
2) Let's call it A11. Once in matlab your image is a multidimensional-array of let's say 450x302x3. Each layer has a color asocciated. Let's select the first A22 = A11(:,:,1) ; You have now a 450x302 matrix.
3) Take a look at your picture now: imshow(A22). Nice. Identify the region where the white square is. Create a 1's row in the matrix: A22(200,:)=1; then plot again. imshow(A22). This is a brute force approach. When you know approximatelly a row where the white rect is, create a loop. Let's say row = 200; Let's say that you identiofied that the columns where the with rect is, are confined to columns 100:150 of Matrix A22;
4) for i = 200 : 250
test_vect = diff(A22(i,100:150)); % this vector will create spikes where the black dots are
maxs(i) = max(test_vect); % or min, you'll see when you plot the test_vect. Select the two maximums.
if maxs(i-1)>maxs(i-2) && maxs(i-1>i)
coord_y = max(i-1);
return
end

Do the same for the coord_x

Good luck
From: Ashish Uthama on
On Wed, 05 May 2010 14:28:07 -0400, Jeremy Ho <jeremyho87(a)yahoo.co.uk>
wrote:

Did you come across these:

http://blogs.mathworks.com/pick/2008/05/23/detecting-circles-in-an-image/

http://www.mathworks.com/matlabcentral/fileexchange/9833