If you have access to the Image Processing Toolbox, you can take advantage of a number of filtering and morphological operations it contains. Here's one way you could approach your problem, using the functions IMFILTER, IMCLOSE, and IMREGIONALMAX:
%# Load and plot the image data:
imageData = imread('lattice_pic.jpg'); %# Load the lattice image
subplot(221);
imshow(imageData);
title('Original image');
%# Gaussian-filter the image:
gaussFilter = fspecial('gaussian',[31 31],9); %# Create the filter
filteredData = imfilter(imageData,gaussFilter);
subplot(222);
imshow(filteredData);
title('Gaussian-filtered image');
%# Perform a morphological close operation:
closeElement = strel('disk',31); %# Create a disk-shaped structuring element
closedData = imclose(filteredData,closeElement);
subplot(223);
imshow(closedData);
title('Closed image');
%# Find the regions where local maxima occur:
maxImage = imregionalmax(closedData);
maxImage = imdilate(maxImage,strel('disk',5)); %# Dilate the points to see
%# them better on the plot
subplot(224);
imshow(maxImage);
title('Maxima locations');
And here's the image the above code creates:
To get things to look good I just kept trying a few different combinations for the parameters for the Gaussian filter (created using FSPECIAL) and the structuring element (created using STREL). However, that little bit of trial and error gave a very nice result.
NOTE: The image returned from IMREGIONALMAX doesn't always have just single pixels set to 1 (to indicate a maxima). The output image often contains clusters of pixels because neighboring pixels in the input image can have equal values, and are therefore both counted as maxima. In the code above I also dilated these points with IMDILATE just to make them easier to see in the image, which makes an even bigger cluster of pixels centered on the maxima. If you want to reduce the cluster of pixels to a single pixel, you should remove the dilation step and modify the image in other ways (add noise to the result or filter it, then find the new maxima, etc.).