I have a 5cm resolution geotiff image for a shoreline. I need to count the number of rocks in three classes (e.g., >6 feet, 3-6 feet, and <3 feet). I don't have any point cloud data.

What will be the best gis approach to solve this problem?

enter image description here

closed as too broad by Spacedman, BERA, PolyGeo Oct 3 at 9:30

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    A "geotiff image" could be anything! It could be a 3-band RGB image, a DEM, some calculated index, etc. Please specify what your image data are. Even better, provide a picture. – Jon Sep 25 at 17:11
  • 3
    @Javed Ok, there is no way that's a 1 band 8 bit raster. Also, I don't think this is a great question for GIS because it's really image processing. You won't need to use any GIS techniques to solve it (unless you want the georeferenced coordinates of each rock). Also, it looks pretty difficult. You'll need edge detection/object identification of some kind. The trees and the algae aren't doing you any favors, either. If you're just doing this image, you can do it by hand by tracing either rock boundaries or major axes, then GIS would be useful. – Jon Sep 25 at 17:31
  • 3
    I haven't messed with it but have seen promising demonstrations for object detection and inventorying. ArcGIS Pro has machine learning capabilities. If Pro isn't available, there are open source machine learning projects out there. – Barbarossa Sep 25 at 18:08
  • 2
    I suggest you ask in the imagej forum forum.image.sc The imagej is used to identify shapes, size, colors, etc. in microscope images, I believe someone there can help you. – hugonbg Sep 25 at 18:09
  • 2
    Since this seems pretty fuzzy, what with rocks being covered by others and other objects, you might want to approach this a rough pattern density problem. Botanists use pictures/transparencies of density to classify sections. There's certainly a way to use GIS to help with this. – danak Sep 25 at 18:45

For the most part not an ArcGIS answer but you could try it anyway since it is completely free software.

You could try using scikit-image. You will get it if you install Anaconda (with Anaconda you also get jupyter-notebook which is a great python ide and lots of other useful python libraries).

I followed this tutorial, with very limited experience of image processing and got some results: Region-based segmentation

import skimage
import numpy as np
rocks = skimage.io.imread('/home/bera/Downloads/rocks.jpg')
rocks_greyscale = skimage.color.rgb2gray(rocks)

elevation_map = skimage.filters.sobel(rocks_greyscale)

markers = np.zeros_like(rocks_greyscale)
markers[rocks_greyscale < 0.3] = 1 #Adjust, I just tried different values
markers[rocks_greyscale > 0.7] = 2 #Adjust

segmentation = skimage.morphology.watershed(elevation_map, markers)

skimage.io.imsave('/home/bera/Downloads/rocks_segmented.tif',segmentation) 

You will need some tweaking. Not all stones are segmented and some things that are not stones is. Then convert the output image to vector and use for example minimum bounding geometry to get size of stones. Or use some raster tool to count different size objects.

enter image description here

enter image description here

  • 2
    You could actually also estimate the height of (some of) the rocks if you could attach each rock's shadow segment to its segment. @Javed I wrote a python script to replace Matlab's regionprops if you make it this far. It provides statistics, coordinates, measurements, etc. on blobs (segments) in your image. It really just wraps around skimage, nothing too fancy. Shoot me a message if you get far along enough to need it. – Jon Sep 25 at 22:44
  • @Jon thanks, Jon. I will let you know. – Javed Sep 26 at 17:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.